25 #include <fastcgi++/config.h>
30 #if defined (HAVE_ENDIAN_H)
32 #elif defined (HAVE_MACHINE_ENDIAN_H)
33 #include <machine/endian.h>
34 #elif defined (HAVE_ARPA_ENDIAN_H)
35 #include <arpa/nameser_compat.h>
37 #error Could not locate a file that defines endianess
42 #include <boost/shared_array.hpp>
83 enum RecordType {
BEGIN_REQUEST=1,
ABORT_REQUEST=2,
END_REQUEST=3,
PARAMS=4,
IN=5,
OUT=6,
ERR=7,
DATA=8,
GET_VALUES=9,
GET_VALUES_RESULT=10,
UNKNOWN_TYPE=11 };
144 #if __BYTE_ORDER == __LITTLE_ENDIAN
148 char* pValue=(
char*)&value-1;
149 char* pValueEnd=pValue+
sizeof(T);
150 char* pResult=(
char*)&result+
sizeof(T);
151 while(pValue!=pValueEnd)
152 *--pResult=*++pValue;
155 #elif __BYTE_ORDER == __BIG_ENDIAN
362 void processParamHeader(
const char* data,
size_t dataSize,
const char*& name,
size_t& nameSize,
const char*& value,
size_t& valueSize);
408 for(
int i=0; i<NAMELENGTH; i++)
name[i]=*(name_+i);
409 for(
int i=0; i<VALUELENGTH; i++)
value[i]=*(value_+i);