diff options
Diffstat (limited to 'ot_http.h')
| -rw-r--r-- | ot_http.h | 18 |
1 files changed, 14 insertions, 4 deletions
| @@ -6,6 +6,16 @@ | |||
| 6 | #ifndef OT_HTTP_H__ | 6 | #ifndef OT_HTTP_H__ |
| 7 | #define OT_HTTP_H__ | 7 | #define OT_HTTP_H__ |
| 8 | 8 | ||
| 9 | #include <stdint.h> | ||
| 10 | #include <sys/types.h> | ||
| 11 | #include <sys/uio.h> | ||
| 12 | |||
| 13 | /* Libowfat */ | ||
| 14 | #include "iob.h" | ||
| 15 | |||
| 16 | #include "ot_buf.h" | ||
| 17 | #include "trackerlogic.h" | ||
| 18 | |||
| 9 | typedef enum { | 19 | typedef enum { |
| 10 | STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, | 20 | STRUCT_HTTP_FLAG_WAITINGFORTASK = 1, |
| 11 | STRUCT_HTTP_FLAG_GZIP = 2, | 21 | STRUCT_HTTP_FLAG_GZIP = 2, |
| @@ -16,16 +26,16 @@ typedef enum { | |||
| 16 | } STRUCT_HTTP_FLAG; | 26 | } STRUCT_HTTP_FLAG; |
| 17 | 27 | ||
| 18 | struct http_data { | 28 | struct http_data { |
| 19 | array request; | 29 | ot_buf request; |
| 20 | io_batch *batch; | 30 | io_batch *batch; |
| 21 | size_t batches; | 31 | size_t batches; |
| 22 | ot_ip6 ip; | 32 | ot_ip6 ip; |
| 23 | STRUCT_HTTP_FLAG flag; | 33 | STRUCT_HTTP_FLAG flag; |
| 24 | }; | 34 | }; |
| 25 | 35 | ||
| 26 | ssize_t http_handle_request(const int64 s, struct ot_workstruct *ws); | 36 | ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws); |
| 27 | ssize_t http_sendiovecdata(const int64 s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); | 37 | ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); |
| 28 | ssize_t http_issue_error(const int64 s, struct ot_workstruct *ws, int code); | 38 | ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code); |
| 29 | 39 | ||
| 30 | extern char *g_stats_path; | 40 | extern char *g_stats_path; |
| 31 | extern ssize_t g_stats_path_len; | 41 | extern ssize_t g_stats_path_len; |
