Skip to content
Uplusware edited this page Jun 20, 2017 · 30 revisions

Brief

Use extension, you can design your application, for example:

  • HTTP Reverse Proxy
  • Self-defined script

Implementation

ext_request

void* ext_request(CHttp* http_session, const char * name, const char * description, const char * parameters, BOOL* skip);

This function will be called after http request has been recieved.

ext_response

void* ext_response(CHttp* http_session, const char * name, const char * description, const char * parameters, Htdoc* doc);

This function will be called before http response will be sent.

ext_finish

void* ext_finish(CHttp* http_session, const char * name, const char * description, const char * parameters, Htdoc* doc);

This function will be called after the whole http trip is finished.

Some resource(heap memory, file descriptor ...) clean work can be done in it.

Extension Data

void CHttp::SetExtentionData(void* extdata)

void* CHttp::GetExtentionData()

Used to store the self-defined user data in extension.

Clone this wiki locally