Barracuda Application Server C/C++ Reference
NO
HttpAsynchReqResp Struct Reference

Detailed Description

Simultaneously receive and send a stream of data.

The HttpAsynchReqResp class makes it possible to asynchronously receive and send data at the same time. The HttpAsynchReqResp can also be used as a replacement for using a HttpAsynchReq and HttpAsynchResp object. An HttpAsynchReqResp instance is easier to use than first using a HttpAsynchReq object for receiving data and then later using a HttpAsynchResp for sending a response message.

#include <HttpAsynchReq.h>

Inheritance diagram for HttpAsynchReqResp:

Public Member Functions

 HttpAsynchReqResp (HttpServer *server, HttpAsynchReq_OnData onData)
 Create a HttpAsynchReqResp instance. More...
 
int start (HttpRequest *req, void *recBuf, S32 recBufSize, void *sendBuf, S32 sendBufSize)
 Start the HttpAsynchReqResp object. More...
 
int startResp (HttpRequest *req, void *sendBuf, S32 sendBufSize)
 Start response if you know that all data was received by the web-server. More...
 
ThreadMutexgetMutex ()
 Get the dispatcher lock.
 
HttpServergetServer ()
 Get the HttpServer object.
 
HttpAsynchRespgetResponse ()
 Get the response object. More...
 
- Public Member Functions inherited from HttpAsynchReq
 HttpAsynchReq (HttpServer *server, HttpAsynchReq_OnData data)
 Create an instance of HttpAsynchReq. More...
 
 ~HttpAsynchReq ()
 Terminate a HttpAsynchReq object.
 
SBaFileSize getPacketSizeLeft ()
 Returns the remaining packet size if the packet size is known – i.e., if the initial HTTP header had a Content-Length header. More...
 
void * getBuffer ()
 Returns a pointer to the internal buffer where the received data is stored. More...
 
SBaFileSize getBufferSize ()
 Returns the lenght of the internal buffer.
 
int start (HttpRequest *req, void *buffer, S32 bufferSize)
 Start receiving data asynchronously. More...
 
void stop ()
 Aborts the operation and terminates the active socket connection.
 
HttpConnectiongetCon (HttpAsynchReq *o)
 Returns the internal active connection object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from HttpAsynchReq
static SBaFileSize calcPacketSize (HttpRequest *req)
 Returns the packet size if the length is known. More...