#include <inet_factory.h>
Public Types | |
typedef sockaddr_in | sockaddr_t |
Base sockaddr type. | |
Public Member Functions | |
ipv4_address () | |
Default constructor. | |
ipv4_address (in_addr const &address, unsigned short port) | |
Constructor. | |
ipv4_address (ipv4_address const &that) | |
Copy constructor. | |
ipv4_address (sockaddr_in const &that) | |
Copy constructor. | |
ipv4_address (sockaddr const &that) | |
Copy constructor. | |
ipv4_address & | operator= (ipv4_address const &that) |
Assignment operator. | |
ipv4_address & | operator= (sockaddr_in const &that) |
Assignment operator. | |
ipv4_address & | operator= (sockaddr const &that) |
Assignment operator. | |
Static Public Attributes | |
static const int | AF = AF_INET |
Address family code. | |
static const in_addr | any |
Any address. | |
static const in_addr | loopback |
The loopback address. |
Definition at line 39 of file inet_factory.h.
|
Constructor. Takes an IPv4 address and a transport port. Parameters are expected in network byte order. For a randomly chosen address, pass in ipv4_address::any as first argument. For a randomly chosen port, pass in 0 as second argument. |
|
Copy constructor. Checks if the address structure is of the correct family. |
|
Assignment operator. Checks if the address structure is of the correct family. |