source: benchmark/io/http/protocol.hfa @ 35ea4f3

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 35ea4f3 was ee59ede, checked in by Thierry Delisle <tdelisle@…>, 4 years ago

Improved error handling in server

  • Property mode set to 100644
File size: 508 bytes
RevLine 
[0aec496]1#pragma once
2
[ece0e80]3struct io_cancellation;
4
[0aec496]5enum HttpCode {
6        OK200 = 0,
7        E400,
8        E404,
[ee59ede]9        E408,
[0aec496]10        E413,
11        E414,
12        KNOWN_CODES
13};
14
[2ecbd7b]15int code_val(HttpCode code);
16
[0aec496]17int answer_error( int fd, HttpCode code );
18int answer_header( int fd, size_t size );
[ba77750]19int answer_plain( int fd, char buffer [], size_t size );
[7270432]20int answer_empty( int fd );
[0aec496]21
[ece0e80]22[HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len, io_cancellation *);
[c82af9f]23
[ee59ede]24int sendfile( int pipe[2], int fd, int ans_fd, size_t count );
Note: See TracBrowser for help on using the repository browser.