Boost C++ Libraries Home Libraries People FAQ More

Home | Reference | Tutorial | Examples | Design
Reference Index | Class Hierarchy | Class Index | Member Index

boost::asio::ip::tcp Class Reference

List of all members.

Detailed Description

Encapsulates the flags needed for TCP.

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

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


Public Types

typedef basic_endpoint< tcpendpoint
 The type of a TCP endpoint.
typedef basic_resolver_query<
tcp
resolver_query
 The type of a resolver query.
typedef basic_resolver_iterator<
tcp
resolver_iterator
 The type of a resolver iterator.
typedef basic_stream_socket<
tcp
socket
 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 IPv4 TCP protocol.


Member Typedef Documentation

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

The type of a TCP endpoint.

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

The type of a resolver query.

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

The type of a resolver iterator.

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

The TCP socket type.

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

The TCP acceptor type.

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

The TCP resolver type.

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

The TCP iostream type.

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

Socket option for disabling the Nagle algorithm.

Implements the IPPROTO_TCP/TCP_NODELAY socket option.

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


Member Function Documentation

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

Construct to represent the IPv4 TCP protocol.

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

Construct to represent the IPv4 TCP protocol.

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

Obtain an identifier for the type of the protocol.

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

Obtain an identifier for the protocol.

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

Obtain an identifier for the protocol family.

Copyright © 2003 - 2006 Christopher M. Kohlhoff


Home | Reference | Tutorial | Examples | Design