![]() |
Gamedev Framework (gf)
0.16.0
A C++14 framework for 2D games
|
A socket address. More...
#include <gf/SocketAddress.h>
Public Member Functions | |
SocketAddress ()=default | |
Default constructor. More... | |
SocketFamily | getFamily () const |
Get the family of the socket address. More... | |
std::string | getHostname (SocketAddressFormat format=SocketAddressFormat::Unrestricted) const |
Get the hostname associated to the address. More... | |
std::string | getService (SocketAddressFormat format=SocketAddressFormat::Unrestricted) const |
Get the service associated to the address. More... | |
A socket address.
A socket address is composed of an IP address (representing an hostname) and a port number (representing a service).
You can not create a socket address directly.
In other libraries, it can also be called "endpoint".
|
default |
Default constructor.
SocketFamily gf::SocketAddress::getFamily | ( | ) | const |
Get the family of the socket address.
std::string gf::SocketAddress::getHostname | ( | SocketAddressFormat | format = SocketAddressFormat::Unrestricted | ) | const |
Get the hostname associated to the address.
format | The format of the socket address |
std::string gf::SocketAddress::getService | ( | SocketAddressFormat | format = SocketAddressFormat::Unrestricted | ) | const |
Get the service associated to the address.
format | The format of the socket address |