Native socket address wrapper. More...
#include <userver/engine/io/sockaddr.hpp>
Public Member Functions | |
| Sockaddr () | |
| Constructs an unspecified native socket address. | |
| Sockaddr (const void *data) | |
| Wraps a native socket address structure. | |
| template<typename T > | |
| T * | As () |
| Domain-specific native socket address structure pointer. | |
| template<typename T > | |
| const T * | As () const |
| Domain-specific native socket address structure pointer. | |
| struct sockaddr * | Data () |
| Native socket address structure pointer. | |
| const struct sockaddr * | Data () const |
| Native socket address structure pointer. | |
| socklen_t | Size () const |
| Maximum supported native socket address structure size. | |
| socklen_t | Capacity () const |
| Maximum supported native socket address structure size. | |
| sa_family_t | Family () const |
| Protocol family. | |
| AddrDomain | Domain () const |
| Communication domain. | |
| bool | HasPort () const |
| Whether the stored socket address family expects a port. | |
| int | Port () const |
| Returns the stored port number if available, otherwise throws. | |
| void | SetPort (int port) |
| Sets a port for address families that allow for one, otherwise throws. | |
| std::string | PrimaryAddressString () const |
| Human-readable address representation. | |
Static Public Member Functions | |
| static constexpr socklen_t | Addrlen (AddrDomain domain) |
| Domain-specific native socket address structure size. | |
Native socket address wrapper.
Definition at line 42 of file sockaddr.hpp.
|
inline |
Constructs an unspecified native socket address.
Definition at line 46 of file sockaddr.hpp.
|
inlineexplicit |
Wraps a native socket address structure.
Definition at line 51 of file sockaddr.hpp.
|
inlinestaticconstexpr |
Domain-specific native socket address structure size.
Definition at line 107 of file sockaddr.hpp.
|
inline |
Domain-specific native socket address structure pointer.
Definition at line 61 of file sockaddr.hpp.
|
inline |
Domain-specific native socket address structure pointer.
Definition at line 70 of file sockaddr.hpp.
|
inline |
Maximum supported native socket address structure size.
Definition at line 85 of file sockaddr.hpp.
|
inline |
Native socket address structure pointer.
Definition at line 76 of file sockaddr.hpp.
|
inline |
Native socket address structure pointer.
Definition at line 79 of file sockaddr.hpp.
|
inline |
Communication domain.
Definition at line 91 of file sockaddr.hpp.
|
inline |
Protocol family.
Definition at line 88 of file sockaddr.hpp.
| std::string engine::io::Sockaddr::PrimaryAddressString | ( | ) | const |
Human-readable address representation.
|
inline |
Maximum supported native socket address structure size.
Definition at line 82 of file sockaddr.hpp.