source: benchmark/io/http/protocol.hfa @ 8bee858

ADTast-experimentalpthread-emulation
Last change on this file since 8bee858 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
RevLine 
[0aec496]1#pragma once
2
[7f0ac12]3struct io_future_t;
[ef3c383]4struct sendfile_stats_t;
5
[0aec496]6enum 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]18int code_val(HttpCode code);
19
[0aec496]20int answer_error( int fd, HttpCode code );
[187fdb8]21int answer_plaintext( int fd );
[7270432]22int answer_empty( int fd );
[ef3c383]23int 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.