bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Boschstruct http_server *http_server_init(const struct http_server_settings *set)
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch pool = pool_alloconly_create("http server", 1024);
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch if (set->rawlog_dir != NULL && *set->rawlog_dir != '\0')
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch server->set.rawlog_dir = p_strdup(pool, set->rawlog_dir);
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch server->set.max_client_idle_time_msecs = set->max_client_idle_time_msecs;
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch (set->max_pipelined_requests > 0 ? set->max_pipelined_requests : 1);
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch server->set.request_limits = set->request_limits;
47fee1a942e4797548b1232354f6676b8ff809f4Stephan Bosch server->set.socket_send_buffer_size = set->socket_send_buffer_size;
47fee1a942e4797548b1232354f6676b8ff809f4Stephan Bosch server->set.socket_recv_buffer_size = set->socket_recv_buffer_size;
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch server->conn_list = http_server_connection_list_init();
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Boschvoid http_server_deinit(struct http_server **_server)
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Boschvoid http_server_switch_ioloop(struct http_server *server)
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch struct connection *_conn = server->conn_list->connections;
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch /* move connections */
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch /* FIXME: we wouldn't necessarily need to switch all of them
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch immediately, only those that have requests now. but also connections
3fcb3d2d1f3583025ff62bae95ec706920f398b1Stephan Bosch that get new requests before ioloop is switched again.. */