MOD_IOLAYER_HTTP
[MOD_IOLAYER]

Collaboration diagram for MOD_IOLAYER_HTTP:

Get Information About Incoming HTTP Messages



GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbCommandIn (const GWEN_IO_LAYER *io)
GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbHeaderIn (const GWEN_IO_LAYER *io)
GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbStatusIn (const GWEN_IO_LAYER *io)

Get Information About Outgoing HTTP Messages



GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbCommandOut (const GWEN_IO_LAYER *io)
GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbHeaderOut (const GWEN_IO_LAYER *io)
GWENHYWFAR_API GWEN_DB_NODEGWEN_Io_LayerHttp_GetDbStatusOut (const GWEN_IO_LAYER *io)

Constructor



GWENHYWFAR_API GWEN_IO_LAYERGWEN_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"

Detailed Description

This module implements the HTTP protocol over a base layer created with GWEN_Io_LayerBuffered_new. It supports the following request types:

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 Documentation

#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"

Definition at line 74 of file io_http.h.

Referenced by GWEN_Io_LayerHttp_new().


Function Documentation

GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbCommandIn ( const GWEN_IO_LAYER io  ) 

Definition at line 92 of file io_http.c.

References GWEN_INHERIT_GETDATA.

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

GWENHYWFAR_API GWEN_DB_NODE* GWEN_Io_LayerHttp_GetDbStatusOut ( const GWEN_IO_LAYER io  ) 

Definition at line 140 of file io_http.c.

References GWEN_INHERIT_GETDATA.

GWENHYWFAR_API GWEN_IO_LAYER* GWEN_Io_LayerHttp_new ( GWEN_IO_LAYER baseLayer  ) 
Generated on Mon Jul 5 22:59:18 2010 for gwenhywfar by  doxygen 1.6.3