HTTP Parser and message builder / objects in plain C Snapshot
Classes | Typedefs | Functions
HTTP_RESPONSE

More...

Classes

struct  tagHTTP_RESPONSE

Typedefs

typedef struct tagHTTP_RESPONSE HTTP_RESPONSE
typedef int(* HTTP_RESP_HEADER_PARSED )(HTTP_RESPONSE *request, void *ctx)
typedef int(* HTTP_RESP_MESSAGE_BODY_DATA )(HTTP_RESPONSE *request, void *data, size_t data_size, void *ctx)
typedef int(* HTTP_RESP_FINISHED )(HTTP_RESPONSE *request, void *ctx)

Functions

M_INLINE int HTTP_RESPONSE_init (HTTP_RESPONSE *message, Http_version_type version, int status_code)
M_INLINE void HTTP_RESPONSE_free (HTTP_RESPONSE *message)

Detailed Description


Typedef Documentation

typedef int(* HTTP_RESP_FINISHED)(HTTP_RESPONSE *request, void *ctx)

Definition at line 196 of file http.h.

typedef int(* HTTP_RESP_HEADER_PARSED)(HTTP_RESPONSE *request, void *ctx)

Definition at line 194 of file http.h.

typedef int(* HTTP_RESP_MESSAGE_BODY_DATA)(HTTP_RESPONSE *request, void *data, size_t data_size, void *ctx)

Definition at line 195 of file http.h.


Function Documentation

M_INLINE void HTTP_RESPONSE_free ( HTTP_RESPONSE message)

Definition at line 189 of file http.h.

{
  HTTP_MESSAGE_free( &message->base );
}
M_INLINE int HTTP_RESPONSE_init ( HTTP_RESPONSE message,
Http_version_type  version,
int  status_code 
)

Definition at line 178 of file http.h.

{
  if (HTTP_MESSAGE_init( &message->base ) ) {
    return -1;
  }
  message->status_code = status_code;
  message->version = version;
  return 0;
}