source: benchmark/io/http/protocol.hfa @ ae020ea

ADTast-experimentalpthread-emulationqualifiedEnum
Last change on this file since ae020ea was 7f0ac12, checked in by Thierry Delisle <tdelisle@…>, 2 years ago

First draft at acceptor thread webserver

  • Property mode set to 100644
File size: 529 bytes
Line 
1#pragma once
2
3struct io_future_t;
4struct sendfile_stats_t;
5
6enum HttpCode {
7        OK200 = 0,
8        OK200_PlainText,
9        E400,
10        E404,
11        E405,
12        E408,
13        E413,
14        E414,
15        KNOWN_CODES
16};
17
18int code_val(HttpCode code);
19
20int answer_error( int fd, HttpCode code );
21int answer_plaintext( int fd );
22int answer_empty( int fd );
23int answer_sendfile( int pipe[2], int fd, int ans_fd, size_t count, struct sendfile_stats_t & );
24
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.