2007-12-03 00:47:09 +00:00
|
|
|
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
|
2007-12-20 05:59:34 +00:00
|
|
|
It is considered beerware. Prost. Skol. Cheers or whatever.
|
2008-10-28 01:27:22 +00:00
|
|
|
|
2007-12-20 05:59:34 +00:00
|
|
|
$id$ */
|
2007-12-03 00:47:09 +00:00
|
|
|
|
2017-04-28 13:41:24 +00:00
|
|
|
#ifndef OT_HTTP_H__
|
|
|
|
#define OT_HTTP_H__
|
2007-12-03 00:47:09 +00:00
|
|
|
|
|
|
|
typedef enum {
|
2009-11-18 04:00:26 +00:00
|
|
|
STRUCT_HTTP_FLAG_WAITINGFORTASK = 1,
|
|
|
|
STRUCT_HTTP_FLAG_GZIP = 2,
|
|
|
|
STRUCT_HTTP_FLAG_BZIP2 = 4
|
2007-12-03 00:47:09 +00:00
|
|
|
} STRUCT_HTTP_FLAG;
|
|
|
|
|
|
|
|
struct http_data {
|
2009-11-18 04:00:26 +00:00
|
|
|
array request;
|
2021-04-24 01:25:30 +00:00
|
|
|
io_batch *batch;
|
|
|
|
size_t batches;
|
2009-01-13 22:41:17 +00:00
|
|
|
ot_ip6 ip;
|
2007-12-03 00:47:09 +00:00
|
|
|
STRUCT_HTTP_FLAG flag;
|
|
|
|
};
|
|
|
|
|
2009-01-05 18:05:39 +00:00
|
|
|
ssize_t http_handle_request( const int64 s, struct ot_workstruct *ws );
|
|
|
|
ssize_t http_sendiovecdata( const int64 s, struct ot_workstruct *ws, int iovec_entries, struct iovec *iovector );
|
|
|
|
ssize_t http_issue_error( const int64 s, struct ot_workstruct *ws, int code );
|
2007-12-03 00:47:09 +00:00
|
|
|
|
2009-06-17 15:06:31 +00:00
|
|
|
extern char *g_stats_path;
|
|
|
|
extern ssize_t g_stats_path_len;
|
|
|
|
|
2007-12-03 01:12:25 +00:00
|
|
|
#endif
|