source: benchmark/io/http/protocol.hfa @ 5ff721a

Last change on this file since 5ff721a 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
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
[32d1383]20// int answer_error( int fd, HttpCode code );
21// int answer_plaintext( int fd );
22// int 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.