source: benchmark/io/http/protocol.hfa @ 0442f93f

ast-experimental
Last change on this file since 0442f93f was 32d1383, checked in by Thierry Delisle <tdelisle@…>, 2 years ago

Committing http server when I know it works

  • Property mode set to 100644
File size: 538 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
20// int answer_error( int fd, HttpCode code );
21// int answer_plaintext( int fd );
22// int 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.