All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
asio::ip::tcp Class Reference

Encapsulates the flags needed for TCP. More...

#include <tcp.hpp>

List of all members.

Public Types

typedef basic_socket_acceptor
< tcp
acceptor
 The TCP acceptor type.
typedef basic_endpoint< tcpendpoint
 The type of a TCP endpoint.
typedef basic_socket_iostream
< tcp
iostream
 The TCP iostream type.
typedef
asio::detail::socket_option::boolean
< IPPROTO_TCP, TCP_NODELAY > 
no_delay
 Socket option for disabling the Nagle algorithm.
typedef basic_resolver< tcpresolver
 The TCP resolver type.
typedef
basic_resolver_iterator< tcp
resolver_iterator
 The type of a resolver iterator.
typedef basic_resolver_query< tcpresolver_query
 The type of a resolver query.
typedef basic_stream_socket< tcpsocket
 The TCP socket type.

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

 tcp (int family)

Private Attributes

int family_

Friends

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

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 44 of file tcp.hpp.


Member Typedef Documentation

The TCP acceptor type.

Definition at line 90 of file tcp.hpp.

The type of a TCP endpoint.

Definition at line 48 of file tcp.hpp.

The TCP iostream type.

Definition at line 96 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::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.

Definition at line 128 of file tcp.hpp.

The TCP resolver type.

Definition at line 93 of file tcp.hpp.

The type of a resolver iterator.

Definition at line 54 of file tcp.hpp.

The type of a resolver query.

Definition at line 51 of file tcp.hpp.

The TCP socket type.

Definition at line 87 of file tcp.hpp.


Constructor & Destructor Documentation

asio::ip::tcp::tcp ( int  family) [inline, explicit, private]

Definition at line 145 of file tcp.hpp.


Member Function Documentation

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

Obtain an identifier for the protocol family.

Definition at line 81 of file tcp.hpp.

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

Obtain an identifier for the protocol.

Definition at line 75 of file tcp.hpp.

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

Obtain an identifier for the type of the protocol.

Definition at line 69 of file tcp.hpp.

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

Construct to represent the IPv4 TCP protocol.

Definition at line 57 of file tcp.hpp.

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

Construct to represent the IPv6 TCP protocol.

Definition at line 63 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 138 of file tcp.hpp.

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

Compare two protocols for equality.

Definition at line 132 of file tcp.hpp.


Member Data Documentation

int asio::ip::tcp::family_ [private]

Definition at line 150 of file tcp.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:41