Giter VIP home page Giter VIP logo

ngx_cpp_dev's Introduction

Name

ngx_cpp_dev

Nginx cpp development kit, with the power of C++11 and Boost Library.

See also :

Table of Contents

Requirements

  • Linux or other UNIX like
  • C++11(gcc 4.6 or later)
  • Boost(1.57 or later)

Please see directiory "setup".

Usage

At first, you must patch nginx/auto/make to enable g++ compiler and C++11.

Please see directory "patch/auto".

For example:

patch -b make make.patch

Then configure nginx with:

./configure --add-module=path/to/ngxpp	\	            # ngx cpp module
			--add-module=xxxx			                # other modules
make

ngx_cpp_module is a pure header library, you should use ngx_cpp_module like this:

#include "NgxAll.hpp"	// include all c++ tools 

Examples

Please see directory http, including echo/filter/variables and so on.

C++ APIs

common tools

Class Name Description
NgxUnsetValue generic unset value -1.
NgxValue wrapper for nginx int, include init/merge/unset.
NgxException wrapper for nginx error code.
NgxPool wrapper for nginx memory pool.
NgxAlloctor adapter to c++ allocator.
NgxString wrapper for nginx ngx_str_t.
NgxClock wrapper for nginx time functions.
NgxDatetime wrapper for nginx date functions.
NgxLog wrapper for nginx error log.

data structure

Class Name Description
NgxArray wrapper for nginx ngx_array_t.
NgxList wrapper for nginx ngx_list_t.
NgxQueue wrapper for nginx ngx_queue_t.
NgxBuf wrapper for nginx ngx_buf_t.
NgxChain wrapper for nginx ngx_chain_t.
NgxRbtree wrapper for nginx ngx_rbtree_t.

modules

Class Name Description
NgxModuleConfig easy to access nginx module confing info.
NgxModule get module's config and ctx data.
NgxCommand wrapper for nginx ngx_command_t.
NgxTake
NgxModuleCtx easy to access nginx module's ctx data.
NgxHttpCoreModule wrapper for ngx_http_core_module
NgxFilter wrapper for nginx filter mechanism.

http process

Class Name Description
NgxHeaders
NgxRequest
NgxResponse
NgxUpstreamHelper
NgxLoadBalance
NgxSubRequest

others

Class Name Description
NgxVariables
NgxVarManager
NgxDigest
NgxTimer

TODO

  • more test suites
  • nginx stream
  • nginx datagram
  • c++ namespace
  • ...

ngx_cpp_dev's People

Contributors

chronolaw avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.