http-server.h revision 85f3bd5926fff0e70b6d259a5c8074bd8cdeb9ad
#ifndef HTTP_SERVER_H
#define HTTP_SERVER_H
#include "http-request.h"
struct istream;
struct ostream;
struct http_request;
struct http_server;
struct http_server_request;
struct http_server_response;
struct http_server_settings {
const char *rawlog_dir;
unsigned int max_client_idle_time_msecs;
/* maximum number of pipelined requests per connection (default = 1) */
unsigned int max_pipelined_requests;
/* request limits */
struct http_request_limits request_limits;
bool debug;
};
struct http_server_stats {
unsigned int request_count, response_count;
};
struct http_server_tunnel {
};
struct http_server_callbacks {
void (*handle_connect_request)(void *context,
};
typedef void (*http_server_tunnel_callback_t)(void *context,
const struct http_server_tunnel *tunnel);
struct http_server_connection *
const char *reason);
const struct http_server_stats *
const struct http_request *
/* Returns the response created for the request with
http_server_response_create(), or NULL if none. */
struct http_server_response *
and close the connection. */
/* Call the specified callback when HTTP request is destroyed. */
void (*callback)(void *),
void *context);
/* Start creating the response for the request. This function can be called
only once for each request. */
struct http_server_response *
/* Submit response and close the connection. */
#endif