client.h 607 Bytes
Newer Older
Jack Moffitt's avatar
Jack Moffitt committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/* client.h
**
** client data structions and function definitions
**
*/
#ifndef __CLIENT_H__
#define __CLIENT_H__

typedef struct _client_tag
{
	/* the clients connection */
	connection_t *con;
	/* the clients http headers */
	http_parser_t *parser;

	/* http response code for this client */
	int respcode;

	/* buffer queue */
	refbuf_queue_t *queue;
	/* position in first buffer */
	unsigned long pos;
} client_t;

client_t *client_create(connection_t *con, http_parser_t *parser);
void client_destroy(client_t *client);
27
void client_send_404(client_t *client, char *message);
Jack Moffitt's avatar
Jack Moffitt committed
28 29

#endif  /* __CLIENT_H__ */