summaryrefslogtreecommitdiff
path: root/ot_http.h
diff options
context:
space:
mode:
Diffstat (limited to 'ot_http.h')
-rw-r--r--ot_http.h28
1 files changed, 28 insertions, 0 deletions
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 @@
1/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
2 It is considered beerware. Prost. Skol. Cheers or whatever. */
3
4#ifndef __OT_HTTP_H__
5#define __OT_HTTP_H__
6
7typedef enum {
8 STRUCT_HTTP_FLAG_ARRAY_USED = 1,
9 STRUCT_HTTP_FLAG_IOB_USED = 2,
10 STRUCT_HTTP_FLAG_WAITINGFORTASK = 4,
11 STRUCT_HTTP_FLAG_GZIP = 8,
12 STRUCT_HTTP_FLAG_BZIP2 = 16
13} STRUCT_HTTP_FLAG;
14
15struct http_data {
16 union {
17 array request;
18 io_batch batch;
19 };
20 char ip[4];
21 STRUCT_HTTP_FLAG flag;
22};
23
24ssize_t http_handle_request( const int64 s, char *data, size_t l );
25ssize_t http_sendiovecdata( const int64 s, int iovec_entries, struct iovec *iovector );
26ssize_t http_issue_error( const int64 s, const char *title, const char *message );
27
28#endif \ No newline at end of file