QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
protocols_util.h File Reference

Support functions for various protocol needs. More...

#include "quickio.h"

Go to the source code of this file.

Classes

struct  protocol_headers
 For holding HTTP headers. More...
 

Functions

void protocol_util_headers (gchar *head, struct protocol_headers *headers)
 From the given buffer, parse out HTTP headers, ignoring the first line (which is typically the GET, POST, etc line). More...
 
gchar * protocol_util_headers_get (const struct protocol_headers *headers, const gchar *key)
 From the list of headers, get the specified header, ignoring case. More...
 

Detailed Description

Support functions for various protocol needs.

Author
Andrew Stone andre.nosp@m.w@cl.nosp@m.ovar..nosp@m.com

Function Documentation

void protocol_util_headers ( gchar *  head,
struct protocol_headers headers 
)

From the given buffer, parse out HTTP headers, ignoring the first line (which is typically the GET, POST, etc line).

Note
Values might have trailing white space, it's not removed for you.
Parameters
headThe string to parse the headers out of.
[out]headersWhere the headers should be placed.
gchar* protocol_util_headers_get ( const struct protocol_headers headers,
const gchar *  key 
)

From the list of headers, get the specified header, ignoring case.

Note
Values might have trailing white space, it's not removed for you.
Parameters
headersAll of the known headers.
keyThe header you're looking for.
Returns
The value of the header; NULL if it doesn't exist.