11 #ifndef ASIO_IP_TCP_HPP 12 #define ASIO_IP_TCP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/basic_socket_acceptor.hpp" 20 #include "asio/basic_socket_iostream.hpp" 21 #include "asio/basic_stream_socket.hpp" 22 #include "asio/detail/socket_option.hpp" 23 #include "asio/detail/socket_types.hpp" 24 #include "asio/ip/basic_endpoint.hpp" 25 #include "asio/ip/basic_resolver.hpp" 26 #include "asio/ip/basic_resolver_iterator.hpp" 27 #include "asio/ip/basic_resolver_query.hpp" 29 #include "asio/detail/push_options.hpp" 54 return tcp(ASIO_OS_DEF(AF_INET));
60 return tcp(ASIO_OS_DEF(AF_INET6));
64 int type() const ASIO_NOEXCEPT
66 return ASIO_OS_DEF(SOCK_STREAM);
72 return ASIO_OS_DEF(IPPROTO_TCP);
90 #if !defined(ASIO_NO_IOSTREAM) 93 #endif // !defined(ASIO_NO_IOSTREAM) 121 #if defined(GENERATING_DOCUMENTATION) 122 typedef implementation_defined
no_delay;
125 ASIO_OS_DEF(IPPROTO_TCP), ASIO_OS_DEF(TCP_NODELAY)>
no_delay;
131 return p1.family_ == p2.family_;
137 return p1.family_ != p2.family_;
142 explicit tcp(
int protocol_family) ASIO_NOEXCEPT
143 : family_(protocol_family)
153 #include "asio/detail/pop_options.hpp" 155 #endif // ASIO_IP_TCP_HPP basic_stream_socket< tcp > socket
The TCP socket type.
Definition: tcp.hpp:82
Iostream interface for a socket.
Definition: basic_socket_iostream.hpp:128
Describes an endpoint for a version-independent IP socket.
Definition: basic_endpoint.hpp:44
static tcp v6() ASIO_NOEXCEPT
Construct to represent the IPv6 TCP protocol.
Definition: tcp.hpp:58
Encapsulates the flags needed for TCP.
Definition: tcp.hpp:45
int family() const ASIO_NOEXCEPT
Obtain an identifier for the protocol family.
Definition: tcp.hpp:76
Provides stream-oriented socket functionality.
Definition: basic_stream_socket.hpp:36
basic_resolver< tcp > resolver
The TCP resolver type.
Definition: tcp.hpp:88
basic_socket_iostream< tcp > iostream
The TCP iostream type.
Definition: tcp.hpp:92
asio::detail::socket_option::boolean< ASIO_OS_DEF(IPPROTO_TCP), ASIO_OS_DEF(TCP_NODELAY)> no_delay
Socket option for disabling the Nagle algorithm.
Definition: tcp.hpp:125
Provides the ability to accept new connections.
Definition: basic_socket_acceptor.hpp:51
Definition: socket_option.hpp:32
friend bool operator==(const tcp &p1, const tcp &p2)
Compare two protocols for equality.
Definition: tcp.hpp:129
int protocol() const ASIO_NOEXCEPT
Obtain an identifier for the protocol.
Definition: tcp.hpp:70
basic_endpoint< tcp > endpoint
The type of a TCP endpoint.
Definition: tcp.hpp:49
basic_socket_acceptor< tcp > acceptor
The TCP acceptor type.
Definition: tcp.hpp:85
int type() const ASIO_NOEXCEPT
Obtain an identifier for the type of the protocol.
Definition: tcp.hpp:64
friend bool operator!=(const tcp &p1, const tcp &p2)
Compare two protocols for inequality.
Definition: tcp.hpp:135
Provides endpoint resolution functionality.
Definition: basic_resolver.hpp:53
Definition: any_io_executor.hpp:28
static tcp v4() ASIO_NOEXCEPT
Construct to represent the IPv4 TCP protocol.
Definition: tcp.hpp:52