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