asio 0.1.5 | Main Page | Class Index | Member Index | Tutorial |
Public Types | |
typedef tcp | default_stream_protocol |
The default stream-based protocol associated with the address type. | |
typedef udp | default_dgram_protocol |
The default datagram-based protocol associated with the address type. | |
typedef detail::socket_addr_type | native_address_type |
The native types of the socket address. These types are dependent on the underlying implementation of the socket layer. | |
typedef boost::uint_t< 16 >::least | port_type |
Underlying types for internet addresses. | |
Public Member Functions | |
address () | |
Default constructor. | |
address (port_type port_num) | |
Construct an address using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY). This constructor would typically be used for accepting new connections. | |
address (port_type port_num, addr_type host_addr) | |
Construct an address using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote address. | |
address (port_type port_num, const std::string &host) | |
Construct an address using a port number and an IP address in dotted decimal form or a host name. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote address. | |
address (const address &other) | |
Copy constructor. | |
address & | operator= (const address &other) |
Assign from another address. | |
int | family () const |
The address family. | |
native_address_type * | native_address () |
Get the underlying address in the native type. | |
const native_address_type * | native_address () const |
Get the underlying address in the native type. | |
native_size_type | native_size () const |
Get the underlying size of the address in the native type. | |
void | native_size (native_size_type size) |
Set the underlying size of the address in the native type. | |
port_type | port () const |
Get the port associated with the address. The port number is always in the host's byte order. | |
void | port (port_type port_num) |
Set the port associated with the address. The port number is always in the host's byte order. | |
addr_type | host_addr () const |
Get the host associated with the address in the numeric form. | |
void | host_addr (addr_type host) |
Set the host associated with the address. | |
std::string | host_addr_str () const |
Get the host's address in dotted decimal format. | |
void | host_addr_str (const std::string &host) |
Set the host's address using dotted decimal format. | |
std::string | host_name () const |
Get the host name. | |
void | host_name (const std::string &host) |
Set the host name. |
|
The default stream-based protocol associated with the address type.
|
|
The default datagram-based protocol associated with the address type.
|
|
The native types of the socket address. These types are dependent on the underlying implementation of the socket layer.
|
|
Underlying types for internet addresses.
|
|
Default constructor.
|
|
Construct an address using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY). This constructor would typically be used for accepting new connections.
|
|
Construct an address using a port number and an IP address. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote address.
|
|
Construct an address using a port number and an IP address in dotted decimal form or a host name. This constructor may be used for accepting connections on a specific interface or for making a connection to a remote address.
|
|
Copy constructor.
|
|
Assign from another address.
|
|
The address family.
|
|
Get the underlying address in the native type.
|
|
Get the underlying address in the native type.
|
|
Get the underlying size of the address in the native type.
|
|
Set the underlying size of the address in the native type.
|
|
Get the port associated with the address. The port number is always in the host's byte order.
|
|
Set the port associated with the address. The port number is always in the host's byte order.
|
|
Get the host associated with the address in the numeric form.
|
|
Set the host associated with the address.
|
|
Get the host's address in dotted decimal format.
|
|
Set the host's address using dotted decimal format.
|
|
Get the host name.
|
|
Set the host name.
|