blob: e8a37d7645fc7e0d001c8d96a046648e6239bd57 [file] [log] [blame]
[email protected]d01c6bd2011-05-31 23:20:591// Copyright (c) 2011 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit586acc5fe2008-07-26 22:42:524
[email protected]f7984fc62009-06-22 23:26:445#ifndef NET_SOCKET_TCP_CLIENT_SOCKET_H_
6#define NET_SOCKET_TCP_CLIENT_SOCKET_H_
initial.commit586acc5fe2008-07-26 22:42:527
[email protected]36987e92008-09-18 18:46:268#include "build/build_config.h"
[email protected]172da1b2011-08-12 15:52:269#include "net/base/net_export.h"
[email protected]dab86192008-09-18 00:10:3810
[email protected]36987e92008-09-18 18:46:2611#if defined(OS_WIN)
[email protected]f7984fc62009-06-22 23:26:4412#include "net/socket/tcp_client_socket_win.h"
[email protected]36987e92008-09-18 18:46:2613#elif defined(OS_POSIX)
[email protected]f7984fc62009-06-22 23:26:4414#include "net/socket/tcp_client_socket_libevent.h"
[email protected]36987e92008-09-18 18:46:2615#endif
16
initial.commit586acc5fe2008-07-26 22:42:5217namespace net {
18
[email protected]836dff32008-08-05 23:15:3619// A client socket that uses TCP as the transport layer.
[email protected]36987e92008-09-18 18:46:2620#if defined(OS_WIN)
[email protected]8f1915d2009-04-20 18:37:3921typedef TCPClientSocketWin TCPClientSocket;
[email protected]36987e92008-09-18 18:46:2622#elif defined(OS_POSIX)
[email protected]8f1915d2009-04-20 18:37:3923typedef TCPClientSocketLibevent TCPClientSocket;
[email protected]36987e92008-09-18 18:46:2624#endif
initial.commit586acc5fe2008-07-26 22:42:5225
[email protected]7f7e92392010-10-26 18:29:2926// Enable/disable experimental TCP FastOpen option.
27// Not thread safe. Must be called during initialization/startup only.
[email protected]172da1b2011-08-12 15:52:2628NET_EXPORT void set_tcp_fastopen_enabled(bool value);
[email protected]7f7e92392010-10-26 18:29:2929
30// Check if the TCP FastOpen option is enabled.
31bool is_tcp_fastopen_enabled();
32
initial.commit586acc5fe2008-07-26 22:42:5233} // namespace net
34
[email protected]f7984fc62009-06-22 23:26:4435#endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_