diff options
Diffstat (limited to 'ot_http.h')
| -rw-r--r-- | ot_http.h | 12 |
1 files changed, 8 insertions, 4 deletions
| @@ -22,7 +22,8 @@ typedef enum { | |||
| 22 | STRUCT_HTTP_FLAG_ZSTD = 8, | 22 | STRUCT_HTTP_FLAG_ZSTD = 8, |
| 23 | STRUCT_HTTP_FLAG_CHUNKED = 16, | 23 | STRUCT_HTTP_FLAG_CHUNKED = 16, |
| 24 | STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32, | 24 | STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER = 32, |
| 25 | STRUCT_HTTP_FLAG_KEEPALIVE = 64 | 25 | STRUCT_HTTP_FLAG_KEEPALIVE = 64, |
| 26 | STRUCT_HTTP_FLAG_ONSTACK = 128 | ||
| 26 | } STRUCT_HTTP_FLAG; | 27 | } STRUCT_HTTP_FLAG; |
| 27 | 28 | ||
| 28 | struct http_data { | 29 | struct http_data { |
| @@ -33,13 +34,16 @@ struct http_data { | |||
| 33 | STRUCT_HTTP_FLAG flag; | 34 | STRUCT_HTTP_FLAG flag; |
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | /* Add to or drop from what this connection is waiting to be told about */ | 37 | /* What this connection is waiting for: EVENT_IN, EVENT_OUT, or nothing */ |
| 37 | void http_interest_add(const int64_t s, struct http_data *cookie, int what); | 38 | void http_interest_set(const int64_t s, struct http_data *cookie, int what); |
| 38 | void http_interest_drop(const int64_t s, struct http_data *cookie, int what); | ||
| 39 | 39 | ||
| 40 | /* Close a connection and release everything that belongs to it */ | 40 | /* Close a connection and release everything that belongs to it */ |
| 41 | void http_close(const int64_t s); | 41 | void http_close(const int64_t s); |
| 42 | 42 | ||
| 43 | /* Promote a stack cookie to a heap one for persistence and handing it over | ||
| 44 | to the event loop. */ | ||
| 45 | int http_adopt(const int64_t s, struct http_data *cookie); | ||
| 46 | |||
| 43 | ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws); | 47 | ssize_t http_handle_request(const int64_t s, struct ot_workstruct *ws); |
| 44 | ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); | 48 | ssize_t http_sendiovecdata(const int64_t s, struct ot_workstruct *ws, size_t iovec_entries, struct iovec *iovector, int is_partial); |
| 45 | ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code); | 49 | ssize_t http_issue_error(const int64_t s, struct ot_workstruct *ws, int code); |
