Socket address wrapper.
This class wraps all socket address types. Socket address is retrieved with sockaddr method and its length with sockaddrlen method.
size() const -> socket_length_typesockaddrlen() const -> UNISTDX_DEPRECATED socket_length_typeGet socket address length, suitable for passing as an argument to system calls.
get() const -> socket_address_type *Get socket address suitable for passing as an argument to system calls.
get() -> socket_address_type *Get socket address suitable for passing as an argument to system calls.
sockaddr() const -> UNISTDX_DEPRECATED socket_address_type *Get socket address suitable for passing as an argument to system calls.
sockaddr() -> UNISTDX_DEPRECATED socket_address_type *Get socket address suitable for passing as an argument to system calls.
port6() const -> UNISTDX_DEPRECATED port_typeGet IPv6 port.
addr6() const -> UNISTDX_DEPRECATED ipv6_addressGet IPv6 address.
port4() const -> UNISTDX_DEPRECATED port_typeGet IPv4 port.
addr4() const -> UNISTDX_DEPRECATED ipv4_addressGet IPv4 address.
clear() -> voidreset() -> UNISTDX_DEPRECATED voidReset socket_address value to nought.
family() const -> socket_address_familyGet socket_address address family.
sa_family() const -> sa_family_typeGet socket_address address family.
port() const -> UNISTDX_DEPRECATED port_typeGet socket_address port.
operator!() const -> boolReturns true, if socket_address has either invalid address or invalid family.
operator bool() constexplicitReturns true, if socket_address has valid address and family.
operator!=(const socket_address & rhs) const -> boolCompare socket addresses taking into account particular address family.
operator>=(const socket_address & rhs) const -> boolCompare socket addresses taking into account particular address family.
operator==(const socket_address & rhs) const -> boolCompare socket addresses taking into account particular address family.
operator<(const socket_address & rhs) const -> boolCompare socket addresses taking into account particular address family.
socket_address(const char * rhs)explicitsocket_address(const socket_address & rhs, port_type newport)Construct socket_address from another one and a new port.
socket_address(const socket_address_type & rhs)
Construct socket_address from sockaddr system type.
socket_address(const netlink_socket_address & rhs)socket_address(const unix_socket_address & rhs)socket_address(const ipv6_socket_address & rhs)socket_address(const ipv4_socket_address & rhs)operator=(socket_address &&) -> socket_address &socket_address(socket_address &&)operator=(const socket_address &) -> socket_address &socket_address(const socket_address &)~socket_address()socket_address()template <class T> template <class T> template <class T> template <class T> Get socket_address in binary form.
Put socket_address in binary form.
Parse textual representation of the socket_address.
Print textual representation of the socket_address.
family() const -> socket_address_familysize() const -> socket_length_typedata() const -> socket_address_type *template <class T> socket_address_view(const T & rhs)Specialisation of std::hash for sys::socket_address.
operator()(const sys::socket_address & rhs) const -> size_tComputes hash by XOR-ing hash of the address with port number. Depending on the address family, uses hash of either ipv4_address or ipv6_address.
operator<<(bstream & out, const socket_address & rhs) -> bstream &Put socket_address in binary form.
operator>>(std::istream & in, socket_address & rhs) -> std::istream &Parse textual representation of the socket_address.
operator>>(bstream & in, socket_address & rhs) -> bstream &Get socket_address in binary form.
template <class T> socket_address_cast(const socket_address & rhs) -> const T &template <class T> socket_address_reinterpret_cast(const socket_address & rhs) -> const T &operator<<(std::ostream & out, const socket_address & rhs) -> std::ostream &Print textual representation of the socket_address.
template <class T> socket_address_reinterpret_cast(socket_address & rhs) -> T &template <class T> socket_address_cast(socket_address & rhs) -> T &