All Classes |Grouped Classes |Index

Class CL_SocketName

Socket name; container class for an IP address and port. More...

Derived from:

None

Derived by:

None

Group:

Sockets (Network)

#include <ClanLib/network.h>

Class Members:

Construction:

CL_SocketName

Constructs a new socket name.


Attributes:

get_address

Returns the address part of the socket name.

get_port

Returns the port part of the socket name.

operator==

Returns true if objects are the same.

operator<

Returns true if the other address is less.

operator>

Returns true if the other address is greater.


Operations:

set_name

Set the socket name using a hostname and port.

set_address

Set the IP address.

set_port

Set the IP port.

lookup_ipv4

Perform a DNS lookup, if needed, for the IP v4 address.

lookup_hostname

Perform a DNS lookup, if needed, for the hostname.

to_ipv4

Create socket name that uses the IP v4 address as its address.

to_hostname

Create socket name that uses the hostname as its address.

to_sockaddr

Fill the socket name into a C sockets sockaddr structure.

from_sockaddr

Get the socket name from a C sockets sockaddr structure.