Encapsulates a sockaddr_storage structure that represents a socket address.
More...
#include <esocket.h>
Encapsulates a sockaddr_storage structure that represents a socket address.
◆ Address() [1/5]
ESocket::Address::Address |
( |
| ) |
|
|
inline |
◆ Address() [2/5]
ESocket::Address::Address |
( |
cpStr |
addr, |
|
|
UShort |
port |
|
) |
| |
|
inline |
Class constructor.
- Parameters
-
addr | the IP address string (IPv4 or IPv6). |
port | the IP port. |
◆ Address() [3/5]
ESocket::Address::Address |
( |
struct sockaddr_in & |
addr | ) |
|
|
inline |
Class constructor.
- Parameters
-
addr | the IPv4 socket address. |
◆ Address() [4/5]
ESocket::Address::Address |
( |
struct sockaddr_in6 & |
addr | ) |
|
|
inline |
Class constructor.
- Parameters
-
addr | the IPv6 socket address. |
◆ Address() [5/5]
ESocket::Address::Address |
( |
const Address & |
addr | ) |
|
|
inline |
Copy constructor.
- Parameters
-
◆ clear()
Address& ESocket::Address::clear |
( |
| ) |
|
|
inline |
Clears this address.
- Returns
- a reference to this address object.
◆ getAddress()
EString ESocket::Address::getAddress |
( |
| ) |
const |
|
inline |
Retrieves the printable IP address.
- Returns
- the printable IP address.
◆ getFamily()
Family ESocket::Address::getFamily |
( |
| ) |
const |
|
inline |
Retrieves the address family for this address.
- Returns
- the address family for this address.
◆ getInet()
struct sockaddr_in& ESocket::Address::getInet |
( |
| ) |
|
|
inline |
Retrieves a reference to this address as an IPv4 address.
- Returns
- a reference to this address as an IPv4 address.
◆ getInet6()
struct sockaddr_in6& ESocket::Address::getInet6 |
( |
| ) |
|
|
inline |
Retrieves a reference to this address as an IPv6 address.
- Returns
- a reference to this address as an IPv6 address.
◆ getPort()
UShort ESocket::Address::getPort |
( |
| ) |
const |
|
inline |
Retrievs the port.
- Returns
- the port.
◆ getSockAddr()
struct sockaddr* ESocket::Address::getSockAddr |
( |
| ) |
|
|
inline |
Retrieves a sockaddr pointer to the socket address.
- Returns
- a sockaddr pointer to the socket address.
◆ getSockAddrLen()
socklen_t ESocket::Address::getSockAddrLen |
( |
| ) |
const |
|
inline |
retrieves the length of the current socket address.
- Returns
- the length of the current socket address.
◆ operator EString()
ESocket::Address::operator EString |
( |
| ) |
const |
|
inline |
Extracts a string object with the printable IP address.
- Returns
- EString representation of the IP address.
◆ operator UShort()
ESocket::Address::operator UShort |
( |
| ) |
const |
|
inline |
Extracts the port.
- Returns
- the port.
◆ operator=() [1/2]
Assignment operator.
- Parameters
-
- Returns
- a reference to this Address object.
◆ operator=() [2/2]
Address& ESocket::Address::operator= |
( |
UShort |
port | ) |
|
|
inline |
Assigns a port value (allowing IPADDR_ANY).
- Parameters
-
- Returns
- a reference to this Address object.
◆ setAddress() [1/2]
Address& ESocket::Address::setAddress |
( |
cpStr |
addr, |
|
|
UShort |
port |
|
) |
| |
|
inline |
Assigns the socket address.
- Parameters
-
addr | the IP address. |
port | the port. |
- Returns
- a reference to this address object.
◆ setAddress() [2/2]
Address& ESocket::Address::setAddress |
( |
UShort |
port | ) |
|
|
inline |
Assigns the socket address.
- Parameters
-
- Returns
- a reference to this address object.
The documentation for this class was generated from the following file:
- /home/vagrant/share/code/epctools/include/epc/esocket.h