asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design
Reference Class Hierarchy | Class Index | Member Index

asio::ip::tcp Class Reference

List of all members.


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.

Public Types

typedef basic_endpoint< tcpendpoint
 The type of a TCP endpoint.
typedef basic_resolver_query< tcpresolver_query
 The type of a resolver query.
typedef
basic_resolver_iterator< tcp
resolver_iterator
 The type of a resolver iterator.
typedef basic_stream_socket< tcpsocket
 The TCP socket type.
typedef basic_socket_acceptor
< tcp
acceptor
 The TCP acceptor type.
typedef basic_resolver< tcpresolver
 The TCP resolver type.
typedef basic_socket_iostream
< tcp
iostream
 The TCP iostream type.
typedef implementation_defined no_delay
 Socket option for disabling the Nagle algorithm.

Public Member Functions

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

Static Public Member Functions

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

Friends

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

Member Typedef Documentation

typedef basic_endpoint<tcp> asio::ip::tcp::endpoint

The type of a TCP endpoint.

typedef basic_resolver_query<tcp> asio::ip::tcp::resolver_query

The type of a resolver query.

typedef basic_resolver_iterator<tcp> asio::ip::tcp::resolver_iterator

The type of a resolver iterator.

typedef basic_stream_socket<tcp> asio::ip::tcp::socket

The TCP socket type.

typedef basic_socket_acceptor<tcp> asio::ip::tcp::acceptor

The TCP acceptor type.

typedef basic_resolver<tcp> asio::ip::tcp::resolver

The TCP resolver type.

typedef basic_socket_iostream<tcp> asio::ip::tcp::iostream

The TCP iostream type.

typedef implementation_defined asio::ip::tcp::no_delay

Socket option for disabling the Nagle algorithm.

Implements the IPPROTO_TCP/TCP_NODELAY socket option.

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


Member Function Documentation

static tcp asio::ip::tcp::v4 (  )  [static]

Construct to represent the IPv4 TCP protocol.

static tcp asio::ip::tcp::v6 (  )  [static]

Construct to represent the IPv6 TCP protocol.

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

Obtain an identifier for the type of the protocol.

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

Obtain an identifier for the protocol.

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

Obtain an identifier for the protocol family.


Friends And Related Function Documentation

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

Compare two protocols for equality.

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

Compare two protocols for inequality.

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design