Realistic 3D camera system
3D camera system components
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
asio::ip::tcp Class Reference

Encapsulates the flags needed for TCP. More...

#include <tcp.hpp>

Public Types

typedef basic_endpoint< tcpendpoint
 The type of a TCP endpoint. More...
 
typedef basic_stream_socket< tcpsocket
 The TCP socket type. More...
 
typedef basic_socket_acceptor< tcpacceptor
 The TCP acceptor type. More...
 
typedef basic_resolver< tcpresolver
 The TCP resolver type. More...
 
typedef basic_socket_iostream< tcpiostream
 The TCP iostream type. More...
 
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(IPPROTO_TCP), ASIO_OS_DEF(TCP_NODELAY)> no_delay
 Socket option for disabling the Nagle algorithm. More...
 

Public Member Functions

int type () const
 Obtain an identifier for the type of the protocol. More...
 
int protocol () const
 Obtain an identifier for the protocol. More...
 
int family () const
 Obtain an identifier for the protocol family. More...
 

Static Public Member Functions

static tcp v4 ()
 Construct to represent the IPv4 TCP protocol. More...
 
static tcp v6 ()
 Construct to represent the IPv6 TCP protocol. More...
 

Friends

bool operator== (const tcp &p1, const tcp &p2)
 Compare two protocols for equality. More...
 
bool operator!= (const tcp &p1, const tcp &p2)
 Compare two protocols for inequality. More...
 

Detailed Description

Encapsulates the flags needed for TCP.

The asio::ip::tcp class contains flags necessary for TCP sockets.

Thread Safety
Distinct objects: Safe.
Shared objects: Safe.
Concepts:
Protocol, InternetProtocol.

Definition at line 45 of file tcp.hpp.

Member Typedef Documentation

The TCP acceptor type.

Definition at line 85 of file tcp.hpp.

The type of a TCP endpoint.

Definition at line 49 of file tcp.hpp.

The TCP iostream type.

Definition at line 92 of file tcp.hpp.

Socket option for disabling the Nagle algorithm.

Implements the IPPROTO_TCP/TCP_NODELAY socket option.

Examples
Setting the option:
...
asio::ip::tcp::no_delay option(true);
socket.set_option(option);
Getting the current option value:
...
asio::ip::tcp::no_delay option;
socket.get_option(option);
bool is_set = option.value();
Concepts:
Socket_Option, Boolean_Socket_Option.

Definition at line 125 of file tcp.hpp.

The TCP resolver type.

Definition at line 88 of file tcp.hpp.

The TCP socket type.

Definition at line 82 of file tcp.hpp.

Member Function Documentation

int asio::ip::tcp::family ( ) const
inline

Obtain an identifier for the protocol family.

Definition at line 76 of file tcp.hpp.

int asio::ip::tcp::protocol ( ) const
inline

Obtain an identifier for the protocol.

Definition at line 70 of file tcp.hpp.

int asio::ip::tcp::type ( ) const
inline

Obtain an identifier for the type of the protocol.

Definition at line 64 of file tcp.hpp.

static tcp asio::ip::tcp::v4 ( )
inlinestatic

Construct to represent the IPv4 TCP protocol.

Definition at line 52 of file tcp.hpp.

static tcp asio::ip::tcp::v6 ( )
inlinestatic

Construct to represent the IPv6 TCP protocol.

Definition at line 58 of file tcp.hpp.

Friends And Related Function Documentation

bool operator!= ( const tcp p1,
const tcp p2 
)
friend

Compare two protocols for inequality.

Definition at line 135 of file tcp.hpp.

bool operator== ( const tcp p1,
const tcp p2 
)
friend

Compare two protocols for equality.

Definition at line 129 of file tcp.hpp.


The documentation for this class was generated from the following file: