21 Internet protocol [internet]

21.13 Class template ip::basic_endpoint [internet.endpoint]

21.13.5 ip::basic_endpoint members (extensible implementations) [internet.endpoint.extensible]

void* data() noexcept;

Returns: addressof(data_).

const void* data() const noexcept;

Returns: addressof(data_).

constexpr size_t size() const noexcept;

Returns: sizeof(sockaddr_in6) if protocol().family() == AF_INET6, otherwise sizeof(sockaddr_in).

void resize(size_t s);

Remarks: length_error if either of the following conditions is true:

  • protocol().family() == AF_INET6 && s != sizeof(sockaddr_in6),

  • protocol().family() == AF_INET4 && s != sizeof(sockaddr_in).

constexpr size_t capacity() const noexcept;

Returns: sizeof(data_).