|
EpcTools
An event based multi-threaded C++ development framework.
|
Encapsulates a sockaddr_storage structure that represents a socket address. More...
#include <esocket.h>
Public Member Functions | |
| Address () | |
| Default constructor. More... | |
| Address (cpStr addr, UShort port) | |
| Class constructor. More... | |
| Address (const struct in_addr &addr, UShort port) | |
| Class constructor. More... | |
| Address (const struct in6_addr &addr, UShort port) | |
| Class constructor. More... | |
| Address (struct sockaddr_in &addr) | |
| Class constructor. More... | |
| Address (struct sockaddr_in6 &addr) | |
| Class constructor. More... | |
| Address (const Address &addr) | |
| Copy constructor. More... | |
| operator EString () const | |
| Extracts a string object with the printable IP address. More... | |
| operator UShort () const | |
| Extracts the port. More... | |
| EString | getAddress () const |
| Retrieves the printable IP address. More... | |
| UShort | getPort () const |
| Retrievs the port. More... | |
| const struct sockaddr_storage & | getSockAddrStorage () const |
| Retrieves a sockaddr pointer to the socket address. More... | |
| struct sockaddr * | getSockAddr () const |
| Retrieves a sockaddr_storage reference to the socket address. More... | |
| socklen_t | getSockAddrLen () const |
| retrieves the length of the current socket address. More... | |
| Address & | operator= (const Address &addr) |
| Assignment operator. More... | |
| Address & | operator= (const sockaddr_in &addr) |
| Assignment operator. More... | |
| Address & | operator= (const sockaddr_in6 &addr) |
| Assignment operator. More... | |
| Address & | operator= (UShort port) |
| Assigns a port value (allowing IPADDR_ANY). More... | |
| Family | getFamily () const |
| Retrieves the address family for this address. More... | |
| const struct sockaddr_storage & | getStorage () const |
| Retrieves the sockaddr_storage. More... | |
| const struct sockaddr_in & | getInet () const |
| Retrieves a reference to this address as an IPv4 address. More... | |
| const struct sockaddr_in6 & | getInet6 () const |
| Retrieves a reference to this address as an IPv6 address. More... | |
| Address & | setAddress (cpStr addr, UShort port) |
| Assigns the socket address. More... | |
| Address & | setAddress (const struct in_addr &addr, UShort port) |
| Assigns the IPv4 socket address. More... | |
| Address & | setAddress (const struct in6_addr &addr, UShort port) |
| Assigns the IPv6 socket address. More... | |
| Address & | setAddress (UShort port, Family fam=Family::INET6) |
| Assigns the socket address. More... | |
| Address & | setAddress (const sockaddr_in &addr) |
| Address & | setAddress (const sockaddr_in6 &addr) |
| Address & | clear () |
| Clears this address. More... | |
Static Public Member Functions | |
| static Family | getFamily (cpStr addr) |
| Determines the address family. More... | |
Encapsulates a sockaddr_storage structure that represents a socket address.
|
inline |
Default constructor.
|
inline |
Class constructor.
| addr | the IP address string (IPv4 or IPv6). |
| port | the IP port. |
|
inline |
Class constructor.
| addr | the IPv4 address. |
| port | the IP port. |
|
inline |
Class constructor.
| addr | the IP IPv6 address. |
| port | the IP port. |
|
inline |
Class constructor.
| addr | the IPv4 socket address. |
|
inline |
Class constructor.
| addr | the IPv6 socket address. |
|
inline |
Copy constructor.
| addr | the Address object to copy. |
|
inline |
Clears this address.
|
inline |
Retrieves the printable IP address.
|
inline |
Retrieves the address family for this address.
|
inlinestatic |
Determines the address family.
|
inline |
Retrieves a reference to this address as an IPv4 address.
|
inline |
Retrieves a reference to this address as an IPv6 address.
|
inline |
Retrievs the port.
|
inline |
Retrieves a sockaddr_storage reference to the socket address.
|
inline |
retrieves the length of the current socket address.
|
inline |
Retrieves a sockaddr pointer to the socket address.
|
inline |
Retrieves the sockaddr_storage.
|
inline |
Extracts a string object with the printable IP address.
|
inline |
Extracts the port.
|
inline |
Assignment operator.
| addr | the IPV4 address object to copy. |
|
inline |
Assignment operator.
| addr | the IPV6 address object to copy. |
|
inline |
Assigns a port value (allowing IPADDR_ANY).
| port | the port. |
|
inline |
Assigns the socket address.
| addr | the IP address. |
| port | the port. |
|
inline |
Assigns the IPv4 socket address.
| addr | the IPv4 address. |
| port | the port. |
|
inline |
Assigns the IPv6 socket address.
| addr | the IPv6 address. |
| port | the port. |
|
inline |
Assigns the socket address.
| port | the port. |
| fam | the address family. |
|
inline |
|
inline |
1.8.11