22#ifndef IO_SOCKET_ADDRESS_HPP
23#define IO_SOCKET_ADDRESS_HPP
24#include <boost/predef.h>
149 auto operator==(const
socket_address &other) const noexcept ->
bool;
179template <
typename SockAddr>
182 "SockAddr must fit into sockaddr_storage_type.");
A platform-independent representation of a socket address.
auto data() noexcept -> sockaddr_type *
Returns a mutable pointer to the underlying socket address data.
auto size() noexcept -> socklen_type *
Returns a mutable pointer to the size of the socket address.
socket_address(const socket_address &other)=default
Default copy constructor.
socket_address()=default
Constructs an empty socket address.
auto operator=(socket_address &&other) noexcept -> socket_address &=default
Default move assignment operator.
auto make_address(const SockAddr *addr=nullptr) noexcept -> socket_address
Creates a socket_address object, optionally initialized from a native address.
auto operator=(const socket_address &other) -> socket_address &=default
Default copy assignment operator.
socket_address(socket_address &&other) noexcept=default
Default move constructor.
The io::socket namespace provides a cross-platform abstraction for socket-level I/O operations.
sockaddr sockaddr_type
The generic socket address structure for POSIX systems.
socklen_t socklen_type
The type used to represent socket-related sizes on POSIX systems.
sockaddr_storage sockaddr_storage_type
The socket address storage structure for POSIX systems.