blob: 965820fb545e6886565f02f01310dfd5552e2b29 (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
It is considered beerware. Prost. Skol. Cheers or whatever.
$id$ */
#ifndef OT_HTTP_H__
#define OT_HTTP_H__
#include <stdint.h>
#include <sys/types.h>
#include <sys/uio.h>
/* Libowfat */
#include "iob.h"
#include "ot_buf.h"
#include "trackerlogic.h"
typedef enum {
STRUCT_HTTP_FLAG_WAITINGFORTASK = 1,
STRUCT_HTTP_FLAG_GZIP = 2,
STRUCT_HTTP_FLAG_BZIP2 = 4,
STRUCT_HTTP_FLAG_ZSTD = 8,
STRUCT_HTTP_FLAG_CHUNKED = 16,
STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32
} STRUCT_HTTP_FLAG;
struct http_data {
ot_buf request;
io_batch *batch;
size_t batches;
ot_ip6 ip;
STRUCT_HTTP_FLAG flag;
};
ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws);
ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial);
ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code);
extern char *g_stats_path;
extern ssize_t g_stats_path_len;
#endif
|