54 -> std::tuple<socket_handle, socket_address> {
56 addr.data(), addr.size())};
57 return std::make_tuple(std::move(handle), addr);
70 auto [address, buffers, control, flags] = msg.get();
72 std::vector<struct iovec> iov;
73 for (
const auto &buffer : buffers)
74 iov.emplace_back(buffer.data(), buffer.size());
77 address.data(), *address.size(), iov.data(), iov.size(),
78 control.data(), control.size(), 0};
91 int level,
int optname,
void *optval,
98 int level,
int optname,
const void *optval,
A platform-independent representation of a socket address.
A thread-safe, move-only RAII wrapper for a native socket handle.
A thread-safe container for socket messages used in advanced I/O operations.
The io::socket namespace provides a cross-platform abstraction for socket-level I/O operations.
msghdr socket_message_type
The socket message type for POSIX systems.
sockaddr sockaddr_type
The generic socket address structure for POSIX systems.
int native_socket_type
The native socket handle type for POSIX systems.
auto tag_invoke(bind_t tag, const socket_handle &socket, const sockaddr_type *addr, socklen_type len) -> int
Binds a socket to a local address.
socklen_t socklen_type
The type used to represent socket-related sizes on POSIX systems.
constexpr detail::cpo< socket::accept_t > accept
A customization point object that accepts an incoming connection on a listening socket.
This file defines the core socket operations for the I/O library.
A tag type for the io::accept customization point object (CPO).
A tag type for the io::bind customization point object (CPO).
A tag type for the io::connect customization point object (CPO).
A tag type for the io::getpeername customization point object (CPO).
A tag type for the io::getsockname customization point object (CPO).
A tag type for the io::getsockopt customization point object (CPO).
A tag type for the io::listen customization point object (CPO).
A tag type for the io::recvmsg customization point object (CPO).
A tag type for the io::sendmsg customization point object (CPO).
A tag type for the io::setsockopt customization point object (CPO).
A tag type for the io::shutdown customization point object (CPO).