message.h 555 Bytes
#ifndef __HTTP_MESSAGE__
#define __HTTP_MESSAGE__

#include "class.h"
#include "http/header.h"

typedef enum e_HttpMessageType {
	HTTP_MESSAGE_BUFFERED=0,
	HTTP_MESSAGE_PIPED
} HttpMessageType;


CLASS(HttpMessage) {
	char *          version;

	HttpHeader      header;

	HttpMessageType type;
	int    			handle;
	char * 			body;
	int             nbody;
};

char   httpMessageHasKeepAlive(HttpMessage);
size_t httpMessageHeaderSizeGet(HttpMessage);
char * httpMessageHeaderToString(HttpMessage, char *);

#endif // __HTTP_MESSAGE__

// vim: set ts=4 sw=4: