Get Information About Incoming HTTP Messages | |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbCommandIn (const GWEN_IO_LAYER *io) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbHeaderIn (const GWEN_IO_LAYER *io) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbStatusIn (const GWEN_IO_LAYER *io) |
Get Information About Outgoing HTTP Messages | |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbCommandOut (const GWEN_IO_LAYER *io) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbHeaderOut (const GWEN_IO_LAYER *io) |
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Io_LayerHttp_GetDbStatusOut (const GWEN_IO_LAYER *io) |
Constructor | |
GWENHYWFAR_API GWEN_IO_LAYER * | GWEN_Io_LayerHttp_new (GWEN_IO_LAYER *baseLayer) |
Flags For This Module | |
You can set these flags using GWEN_Io_Layer_SetFlags() or GWEN_Io_Layer_AddFlags(). | |
#define | GWEN_IO_LAYER_HTTP_FLAGS_IPC 0x00000001 |
Makro Defining the Type Name | |
#define | GWEN_IO_LAYER_HTTP_TYPE "http" |
There is special handling of the flag GWEN_IO_REQUEST_FLAG_PACKETBEGIN.
If a new HTTP request is to be read then this flag must be set in the first read request regarding that HTTP message. All remaining read requests for this particular HTTP message must have this flag cleared. This allows this layer to stay in sync with incoming data on one side and the user requests on the other side.
If an incoming HTTP message has been fully read then this layer will set the flag GWEN_IO_REQUEST_FLAGS_PACKETEND on the user's read request.
If a write request has the flag GWEN_IO_REQUEST_FLAG_PACKETBEGIN set then a new HTTP message is started. Therefore this layer will write the command/status line followed by a header. If the write request contained data this will also be sent.
If a write request does not have that flag set then it is assumed that an already started HTTP message is to be continued. This layer wll monitor the amount of the data written for the HTTP body and will stop sending data when the number of bytes written equals that given for the header Content-length.
If Content-length has the value -1 (indicating that it is unknown) then this kind of monitoring is disabled (so this layer will send any data written to it).
#define GWEN_IO_LAYER_HTTP_FLAGS_IPC 0x00000001 |
If this flag is set then this layer is used for GWEN's IPC code. This means that only requests are sent (normally one side sends a request and the other replies with a response. In IPC mode however all messages are requests in HTTP-sense).
Definition at line 89 of file io_http.h.
Referenced by GWEN_Io_LayerHttp_AddRequest(), and GWEN_Io_LayerHttp_ParseCommand().
#define GWEN_IO_LAYER_HTTP_TYPE "http" |
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbCommandIn | ( | const GWEN_IO_LAYER * | io | ) |
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbCommandOut | ( | const GWEN_IO_LAYER * | io | ) |
Definition at line 128 of file io_http.c.
References GWEN_INHERIT_GETDATA.
Referenced by GWEN_HttpSession_Init(), GWEN_HttpSession_SendPacket(), and GWEN_Io_LayerHttp_WorkOnRequests().
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbHeaderIn | ( | const GWEN_IO_LAYER * | io | ) |
Definition at line 116 of file io_http.c.
References GWEN_INHERIT_GETDATA.
Referenced by GWEN_HttpSession__RecvPacket().
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbHeaderOut | ( | const GWEN_IO_LAYER * | io | ) |
Definition at line 152 of file io_http.c.
References GWEN_INHERIT_GETDATA.
Referenced by GWEN_HttpSession_Init(), and GWEN_HttpSession_SendPacket().
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbStatusIn | ( | const GWEN_IO_LAYER * | io | ) |
Definition at line 104 of file io_http.c.
References GWEN_INHERIT_GETDATA.
Referenced by GWEN_HttpSession__RecvPacket().
GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbStatusOut | ( | const GWEN_IO_LAYER * | io | ) |
GWENHYWFAR_API GWEN_IO_LAYER* GWEN_Io_LayerHttp_new | ( | GWEN_IO_LAYER * | baseLayer | ) |
Creates a new IO layer using the given base layer.
Definition at line 42 of file io_http.c.
References GWEN_Buffer_new(), GWEN_DB_Group_new(), GWEN_INHERIT_SETDATA, GWEN_IO_LAYER_HTTP_TYPE, GWEN_Io_Layer_new(), GWEN_Io_Layer_SetAddRequestFn(), GWEN_Io_Layer_SetDelRequestFn(), GWEN_Io_Layer_SetHasWaitingRequestsFn(), GWEN_Io_Layer_SetWorkOnRequestsFn(), GWEN_Io_LayerHttp_AddRequest(), GWEN_Io_LayerHttp_DelRequest(), GWEN_Io_LayerHttp_freeData(), GWEN_Io_LayerHttp_HasWaitingRequests(), GWEN_Io_LayerHttp_WorkOnRequests(), and GWEN_NEW_OBJECT.
Referenced by GWEN_HttpSession_Init(), and GWEN_Io_LayerHttp_WorkOnRequests().