UNISTDX_NET_SOCKET_ADDRESS
class sys::socket_address

Socket address wrapper. This class wraps all socket address types. Socket address is retrieved with sockaddr method and its length with sockaddrlen method.

  • This is variant class, type of which is encoded in address family.

Methods
Friends
  • template <class T>
    socket_address_reinterpret_cast
  • template <class T>
    socket_address_reinterpret_cast
  • template <class T>
    socket_address_cast
  • template <class T>
    socket_address_cast
  • operator>>

    Get socket_address in binary form.

  • operator<<

    Put socket_address in binary form.

  • operator>>

    Parse textual representation of the socket_address.

  • operator<<

    Print textual representation of the socket_address.

  • std::hash< sys::socket_address >
class sys::socket_address_view
Methods
struct std::hash< sys::socket_address >

Specialisation of std::hash for sys::socket_address.

Methods
  • operator()(const sys::socket_address & rhs) const -> size_t

    Computes 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 &