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

Detailed Description

The HttpRecData class makes it easy to upload packets or large data chunks when using Barracuda in multithread mode.

This class gives similar functionality to HttpAsynchReq and makes it possible to receive any kind of data sent from a client in a CSP page or in a HttpDir/HttpPage.

CSP example

<%p
if(HttpRecData::valid(req) >=0)
{
HttpRecData rd(request); //Create on stack inside a CSP page.
char buf[1500];
S32 len;
while( (len = rd.read(buf, sizeof(buf))) > 0)
{
//Save buf
}
if(len < 0)
response->printf("failed");
else
response->printf("OK");
}
else
{
response->printf("Bugger off");
}
%>

#include <HttpRecData.h>

Public Member Functions

 HttpRecData (HttpRequest *req)
 The constructor is typically run by creating an object on the stack. More...
 
 ~HttpRecData ()
 Destructor.
 
S32 read (void *buf, S32 bufSize)
 Read data from socket. More...
 

Static Public Member Functions

static SBaFileSize valid (HttpRequest *req)
 This method validates the client HTTP request. More...
 
HttpResponse::printf
int printf(const char *fmt,...)
printf is used for sending formatted data to the client.
Definition: HttpServer.h:1810
HttpRecData::valid
static SBaFileSize valid(HttpRequest *req)
This method validates the client HTTP request.
Definition: HttpRecData.h:129
HttpRecData
The HttpRecData class makes it easy to upload packets or large data chunks when using Barracuda in mu...
Definition: HttpRecData.h:78