From afea7d5ee236e73d340b79f509c090c4f40fc7e0 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Mon, 3 Dec 2007 00:47:09 +0000 Subject: Move http handling to its own sources --- ot_http.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ot_http.h (limited to 'ot_http.h') diff --git a/ot_http.h b/ot_http.h new file mode 100644 index 0000000..84b9028 --- /dev/null +++ b/ot_http.h @@ -0,0 +1,28 @@ +/* This software was written by Dirk Engling + It is considered beerware. Prost. Skol. Cheers or whatever. */ + +#ifndef __OT_HTTP_H__ +#define __OT_HTTP_H__ + +typedef enum { + STRUCT_HTTP_FLAG_ARRAY_USED = 1, + STRUCT_HTTP_FLAG_IOB_USED = 2, + STRUCT_HTTP_FLAG_WAITINGFORTASK = 4, + STRUCT_HTTP_FLAG_GZIP = 8, + STRUCT_HTTP_FLAG_BZIP2 = 16 +} STRUCT_HTTP_FLAG; + +struct http_data { + union { + array request; + io_batch batch; + }; + char ip[4]; + STRUCT_HTTP_FLAG flag; +}; + +ssize_t http_handle_request( const int64 s, char *data, size_t l ); +ssize_t http_sendiovecdata( const int64 s, int iovec_entries, struct iovec *iovector ); +ssize_t http_issue_error( const int64 s, const char *title, const char *message ); + +#endif \ No newline at end of file -- cgit v1.2.3