#include <ipsockaddr.h>
Public Member Functions | |
IPSocketAddress (const struct sockaddr *initaddr) | |
IPSocketAddress (const std::string &address, int port) | |
Instantiate a new IPSocketAddress given an address and port. | |
~IPSocketAddress () | |
u_short | port () const |
Return the port number stored in this IPSocketAddress. | |
std::string | get_id () const |
This code acts as a wrapper around sockaddr_in and sockaddr_in6, and knows internally how to deal with the IPv6 vs. IPv6 issues. The storage, of course, is the sockaddr_storage (SocketAddress::addr) inherited from our parent class.
Definition at line 59 of file ipsockaddr.h.
IPSocketAddress::IPSocketAddress | ( | const struct sockaddr * | initaddr | ) | [inline] |
Definition at line 61 of file ipsockaddr.h.
IPSocketAddress::IPSocketAddress | ( | const std::string & | address, | |
int | port | |||
) |
Instantiate a new IPSocketAddress given an address and port.
This takes an IP address and [optional?] port number and initialized this SocketAddress.
Definition at line 61 of file ipsockaddr.cc.
References SocketAddress::set_addr().
IPSocketAddress::~IPSocketAddress | ( | ) |
Definition at line 109 of file ipsockaddr.cc.
u_short IPSocketAddress::port | ( | ) | const |
Return the port number stored in this IPSocketAddress.
Definition at line 120 of file ipsockaddr.cc.
References SocketAddress::addr, and SocketAddress::family().
Referenced by get_id(), and socket_sender().
string IPSocketAddress::get_id | ( | void | ) | const [virtual] |
Implements SocketAddress.
Definition at line 143 of file ipsockaddr.cc.
References SocketAddress::addr, SocketAddress::family(), port(), and SocketAddress::sock_addrlen.