[email protected] | d01c6bd | 2011-05-31 23:20:59 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 4 | |
[email protected] | f7984fc6 | 2009-06-22 23:26:44 | [diff] [blame] | 5 | #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_H_ |
6 | #define NET_SOCKET_TCP_CLIENT_SOCKET_H_ | ||||
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 7 | |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 8 | #include "build/build_config.h" |
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 9 | #include "net/base/net_export.h" |
[email protected] | dab8619 | 2008-09-18 00:10:38 | [diff] [blame] | 10 | |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 11 | #if defined(OS_WIN) |
[email protected] | f7984fc6 | 2009-06-22 23:26:44 | [diff] [blame] | 12 | #include "net/socket/tcp_client_socket_win.h" |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 13 | #elif defined(OS_POSIX) |
[email protected] | f7984fc6 | 2009-06-22 23:26:44 | [diff] [blame] | 14 | #include "net/socket/tcp_client_socket_libevent.h" |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 15 | #endif |
16 | |||||
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 17 | namespace net { |
18 | |||||
[email protected] | 836dff3 | 2008-08-05 23:15:36 | [diff] [blame] | 19 | // A client socket that uses TCP as the transport layer. |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 20 | #if defined(OS_WIN) |
[email protected] | 8f1915d | 2009-04-20 18:37:39 | [diff] [blame] | 21 | typedef TCPClientSocketWin TCPClientSocket; |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 22 | #elif defined(OS_POSIX) |
[email protected] | 8f1915d | 2009-04-20 18:37:39 | [diff] [blame] | 23 | typedef TCPClientSocketLibevent TCPClientSocket; |
[email protected] | 36987e9 | 2008-09-18 18:46:26 | [diff] [blame] | 24 | #endif |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 25 | |
[email protected] | 7f7e9239 | 2010-10-26 18:29:29 | [diff] [blame] | 26 | // Enable/disable experimental TCP FastOpen option. |
27 | // Not thread safe. Must be called during initialization/startup only. | ||||
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 28 | NET_EXPORT void set_tcp_fastopen_enabled(bool value); |
[email protected] | 7f7e9239 | 2010-10-26 18:29:29 | [diff] [blame] | 29 | |
30 | // Check if the TCP FastOpen option is enabled. | ||||
31 | bool is_tcp_fastopen_enabled(); | ||||
32 | |||||
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 33 | } // namespace net |
34 | |||||
[email protected] | f7984fc6 | 2009-06-22 23:26:44 | [diff] [blame] | 35 | #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ |