1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_TOOLS_FLIP_SERVER_FLIP_CONFIG_H_
6 #define NET_TOOLS_FLIP_SERVER_FLIP_CONFIG_H_
13 #include "base/logging.h"
14 #include "net/tools/flip_server/create_listener.h"
18 enum FlipHandlerType
{
20 FLIP_HANDLER_SPDY_SERVER
,
21 FLIP_HANDLER_HTTP_SERVER
26 FlipAcceptor(enum FlipHandlerType flip_handler_type
,
27 std::string listen_ip
,
28 std::string listen_port
,
29 std::string ssl_cert_filename
,
30 std::string ssl_key_filename
,
31 std::string http_server_ip
,
32 std::string http_server_port
,
33 std::string https_server_ip
,
34 std::string https_server_port
,
36 int accept_backlog_size
,
44 enum FlipHandlerType flip_handler_type_
;
45 std::string listen_ip_
;
46 std::string listen_port_
;
47 std::string ssl_cert_filename_
;
48 std::string ssl_key_filename_
;
49 std::string http_server_ip_
;
50 std::string http_server_port_
;
51 std::string https_server_ip_
;
52 std::string https_server_port_
;
54 int accept_backlog_size_
;
56 int accepts_per_wake_
;
59 int ssl_session_expiry_
;
60 bool ssl_disable_compression_
;
61 int idle_socket_timeout_s_
;
69 void AddAcceptor(enum FlipHandlerType flip_handler_type
,
70 std::string listen_ip
,
71 std::string listen_port
,
72 std::string ssl_cert_filename
,
73 std::string ssl_key_filename
,
74 std::string http_server_ip
,
75 std::string http_server_port
,
76 std::string https_server_ip
,
77 std::string https_server_port
,
79 int accept_backlog_size
,
86 std::vector
<FlipAcceptor
*> acceptors_
;
87 double server_think_time_in_s_
;
88 enum logging::LoggingDestination log_destination_
;
89 std::string log_filename_
;
91 int ssl_session_expiry_
;
92 bool ssl_disable_compression_
;
93 int idle_socket_timeout_s_
;
98 #endif // NET_TOOLS_FLIP_SERVER_FLIP_CONFIG_H_