source:
benchmark/io/http/protocol.hfa@
793eb2f
| Last change on this file since 793eb2f was 32d1383, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 538 bytes | |
| Rev | Line | |
|---|---|---|
| [0aec496] | 1 | #pragma once |
| 2 | ||
| [7f0ac12] | 3 | struct io_future_t; |
| [ef3c383] | 4 | struct sendfile_stats_t; |
| 5 | ||
| [0aec496] | 6 | enum HttpCode { |
| 7 | OK200 = 0, | |
| [ed2cb3c] | 8 | OK200_PlainText, |
| [0aec496] | 9 | E400, |
| 10 | E404, | |
| [b57db73] | 11 | E405, |
| [ee59ede] | 12 | E408, |
| [0aec496] | 13 | E413, |
| 14 | E414, | |
| 15 | KNOWN_CODES | |
| 16 | }; | |
| 17 | ||
| [2ecbd7b] | 18 | int code_val(HttpCode code); |
| 19 | ||
| [32d1383] | 20 | // int answer_error( int fd, HttpCode code ); |
| 21 | // int answer_plaintext( int fd ); | |
| 22 | // int answer_empty( int fd ); | |
| [ef3c383] | 23 | int answer_sendfile( int pipe[2], int fd, int ans_fd, size_t count, struct sendfile_stats_t & ); |
| [0aec496] | 24 | |
| [7f0ac12] | 25 | [HttpCode code, bool closed, * const char file, size_t len] http_read(volatile int & fd, []char buffer, size_t len, io_future_t * f); |
Note:
See TracBrowser
for help on using the repository browser.