#include <senf/Socket/Protocols/INet/INetAddressing.hh>
INet4Address wraps the standard sockaddr_in datatype. It provides simple accessor methods to access the host and port. It does not integrate gethostbyname
or DNS lookup.
Definition at line 53 of file INetAddressing.hh.
Public Member Functions |
|
INet4Address | address () const |
Return address. |
|
unsigned | port () const |
Return port number. |
|
void | address (INet4Address const &addr) |
Set address. |
|
void | port (unsigned p) |
Set port number. |
|
Static Public Attributes |
|
static short const | addressFamily = AF_INET |
Related Functions |
|
(Note that these are not member functions.) |
|
std::ostream & | operator<< (std::ostream &os, INet4SocketAddress const &addr) |
Write address and port to os. |
|
Structors and default members |
|
INet4SocketAddress () | |
INet4SocketAddress (std::string const &addr) | |
Set address and port. |
|
INet4SocketAddress (INet4Address const &addr, unsigned port) | |
Set address and port explicitly. |
|
INet4SocketAddress (unsigned port) | |
Set port, address is set to 0.0.0.0. |
|
INet4SocketAddress (const INet4SocketAddress &other) | |
INet4SocketAddress & | operator= (const INet4SocketAddress &other) |
senf::INet4SocketAddress:: | ||||
INet4SocketAddress | () | |||
Definition at line 36 of file INetAddressing.cci.
senf::INet4SocketAddress:: | ||||
INet4SocketAddress | ( | std::string const & | addr | ) |
Set address and port.
This constructor expects a string of the form 'host:port'. The constructor will use this value to initialize the host and port members. Since it uses the INet4Address::from_string constructor, this call may block while waiting for the resolver.
AddressSyntaxException | if the address syntax is invalid | |
UnknownHostnameException | if the address cannot be resolved. |
Definition at line 47 of file INetAddressing.cc.
senf::INet4SocketAddress:: | ||||
INet4SocketAddress | ( | INet4Address const & | addr, | |
unsigned | port | ) | ||
Set address and port explicitly.
[in] | addr | IP address |
[in] | port | port number |
Definition at line 62 of file INetAddressing.cc.
senf::INet4SocketAddress:: | ||||
INet4SocketAddress | ( | unsigned | port | ) |
Set port, address is set to 0.0.0.0.
[in] | port | port number |
Definition at line 69 of file INetAddressing.cc.
senf::INet4SocketAddress:: | ||||
INet4SocketAddress | ( | const INet4SocketAddress & | other | ) |
Definition at line 40 of file INetAddressing.cci.
void senf::INet4SocketAddress:: | ||||
address | ( | INet4Address const & | addr | ) |
Set address.
Definition at line 63 of file INetAddressing.cci.
senf::INet4Address senf::INet4SocketAddress:: | ||||
address | () | |||
Return address.
Definition at line 51 of file INetAddressing.cci.
senf::INet4SocketAddress & senf::INet4SocketAddress:: | ||||
operator= | ( | const INet4SocketAddress & | other | ) |
Definition at line 45 of file INetAddressing.cci.
void senf::INet4SocketAddress:: | ||||
port | ( | unsigned | p | ) |
Set port number.
Definition at line 68 of file INetAddressing.cci.
unsigned senf::INet4SocketAddress:: | ||||
port | () | |||
Return port number.
Definition at line 57 of file INetAddressing.cci.
std::ostream & | ||||
operator<< | ( | std::ostream & | os, | |
INet4SocketAddress const & | addr | ) | ||
Write address and port to os.
short const senf::INet4SocketAddress::addressFamily = AF_INET | ||||
[static] | ||||
Definition at line 57 of file INetAddressing.hh.