AsyncBerkeley
Asynchronous Berkeley sockets. Simple.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
io::socket::socket_message< Addr, Allocator > Struct Template Reference

Represents a complete socket message. More...

#include <io/socket/socket_message.hpp>

Public Types

using message_allocator = std::allocator_traits< Allocator >::template rebind_alloc< native_buffer_type >
 The allocator type for message buffers.
 
using control_allocator = std::allocator_traits< Allocator >::template rebind_alloc< std::byte >
 The allocator type for control data.
 
using address_type = std::optional< socket_address< Addr > >
 The socket address type.
 
using message_type = message_buffer< message_allocator >
 The message buffer type.
 
using control_type = std::vector< std::byte, control_allocator >
 The control buffer type.
 

Public Member Functions

 operator message_header () noexcept
 Converts the socket message to the portable message header type.
 
 operator socket_message_type () noexcept
 Converts the socket message to the native socket message type.
 

Public Attributes

address_type address
 Optional address of the sender/receiver.
 
message_type buffers
 Buffers for scatter/gather I/O.
 
control_type control
 Ancillary data (control information).
 
int flags {}
 Flags on the received message.
 

Detailed Description

template<SocketAddress Addr = sockaddr_storage_type, AllocatorLike Allocator = std::allocator<char>>
struct io::socket::socket_message< Addr, Allocator >

Represents a complete socket message.

This structure extends message_header with storage for buffers and control data.


The documentation for this struct was generated from the following file: