#include <SocketAddress.h++>
Public Member Functions | |
| SocketAddress () throw () | |
| Construct a new, null SocketAddress. | |
| SocketAddress (const InetAddress &address, uint16_t port) | |
| Construct a new SocketAddress for a given IP address and port number. | |
| SocketAddress (const struct sockaddr &other) throw () | |
| Construct a new SocketAddress for a given sockaddr structure. | |
| SocketAddress (const struct sockaddr_in &other) throw () | |
| Construct a new SocketAddress for a given sockaddr_in structure. | |
| SocketAddress (const SocketAddress &other) throw () | |
| Copy constructor. | |
| ~SocketAddress () throw () | |
| Destructor. | |
| SocketAddress & | operator= (const struct sockaddr &other) throw () |
| Assignment operator. | |
| SocketAddress & | operator= (const struct sockaddr_in &other) throw () |
| Assignment operator. | |
| SocketAddress & | operator= (const SocketAddress &other) throw () |
| Assignment operator. | |
| InetAddress | getAddress () const throw () |
| Get the IP address for this address. | |
| void | setAddress (const InetAddress &address) throw () |
| Set the IP address for this address. | |
| void | setHost (const String &host) throw (HostNotFoundException) |
| Set the hostname for this address. | |
| uint16_t | getPort () const throw () |
| Get the port number for this address. | |
| void | setPort (uint16_t port) throw () |
| Set the port number for this address. | |
| void | setSocketAddress (const struct sockaddr &addr) throw () |
| Set the address from a sockaddr structure. | |
| sockaddr | getSocketAddress () const throw () |
| Get the address as a sockaddr structure. | |
| void | reset () throw () |
| Reset the address to a null address. | |
| operator sockaddr * () throw () | |
| Cast operator. | |
| operator sockaddr_in * () throw () | |
| Cast operator. | |
| String | toString () const |
| Get a String representation for this address. | |
| bool | operator== (const SocketAddress &other) const throw () |
| Equality operator. | |
| bool | operator!= (const SocketAddress &other) const throw () |
| Inequality operator. | |
The address consists of an IP address and a port number.
| SocketAddress | ( | ) | throw () |
Construct a new, null SocketAddress.
| SocketAddress | ( | const InetAddress & | address, | |
| uint16_t | port | |||
| ) |
Construct a new SocketAddress for a given IP address and port number.
| address | The IP address. | |
| port | The port number. |
| SocketAddress | ( | const struct sockaddr & | other | ) | throw () [explicit] |
Construct a new SocketAddress for a given sockaddr structure.
| SocketAddress | ( | const struct sockaddr_in & | other | ) | throw () [explicit] |
Construct a new SocketAddress for a given sockaddr_in structure.
| SocketAddress | ( | const SocketAddress & | other | ) | throw () |
Copy constructor.
| ~SocketAddress | ( | ) | throw () |
Destructor.
| InetAddress getAddress | ( | ) | const throw () |
Get the IP address for this address.
| uint16_t getPort | ( | ) | const throw () [inline] |
Get the port number for this address.
| sockaddr getSocketAddress | ( | ) | const throw () [inline] |
Get the address as a sockaddr structure.
| operator sockaddr * | ( | ) | throw () [inline] |
Cast operator.
| operator sockaddr_in * | ( | ) | throw () [inline] |
Cast operator.
| bool operator!= | ( | const SocketAddress & | other | ) | const throw () [inline] |
Inequality operator.
| SocketAddress & operator= | ( | const SocketAddress & | other | ) | throw () |
Assignment operator.
| SocketAddress & operator= | ( | const struct sockaddr_in & | other | ) | throw () |
Assignment operator.
| SocketAddress & operator= | ( | const struct sockaddr & | other | ) | throw () |
Assignment operator.
| bool operator== | ( | const SocketAddress & | other | ) | const throw () |
Equality operator.
| void reset | ( | ) | throw () |
Reset the address to a null address.
| void setAddress | ( | const InetAddress & | address | ) | throw () |
Set the IP address for this address.
| void setHost | ( | const String & | host | ) | throw (HostNotFoundException) |
Set the hostname for this address.
| host | The host, as a dot-separated IP address or DNS name. |
| HostNotFoundException | If the hostname could not be resolved. |
| void setPort | ( | uint16_t | port | ) | throw () [inline] |
Set the port number for this address.
| void setSocketAddress | ( | const struct sockaddr & | addr | ) | throw () [inline] |
Set the address from a sockaddr structure.
| String toString | ( | ) | const |
Get a String representation for this address.
struct sockaddr_in _insaddr [read] |
struct sockaddr _saddr [read] |
1.5.9