MySQL 8.4.0
Source Code Documentation
net::basic_datagram_socket< Protocol > Class Template Reference

#include <socket.h>

Inheritance diagram for net::basic_datagram_socket< Protocol >:
[legend]

Public Types

using protocol_type = Protocol
 
using native_handle_type = impl::socket::native_handle_type
 
using endpoint_type = typename protocol_type::endpoint
 
using error_type = std::error_code
 
- Public Types inherited from net::basic_socket< Protocol >
using executor_type = io_context::executor_type
 
using protocol_type = Protocol
 
using native_handle_type = impl::socket::native_handle_type
 
using error_type = impl::socket::error_type
 
using endpoint_type = typename protocol_type::endpoint
 
- Public Types inherited from net::socket_base
enum class  shutdown_type { shutdown_receive = SHUT_RD , shutdown_send = SHUT_WR , shutdown_both = SHUT_RDWR }
 
using broadcast = socket_option::boolean< SOL_SOCKET, SO_BROADCAST >
 
using debug = socket_option::boolean< SOL_SOCKET, SO_DEBUG >
 
using do_not_route = socket_option::boolean< SOL_SOCKET, SO_DONTROUTE >
 
using error = socket_option::integer< SOL_SOCKET, SO_ERROR >
 
using keep_alive = socket_option::boolean< SOL_SOCKET, SO_KEEPALIVE >
 
using out_of_band_inline = socket_option::boolean< SOL_SOCKET, SO_OOBINLINE >
 
using receive_buffer_size = socket_option::integer< SOL_SOCKET, SO_RCVBUF >
 
using receive_low_watermark = socket_option::integer< SOL_SOCKET, SO_RCVLOWAT >
 
using reuse_address = socket_option::boolean< SOL_SOCKET, SO_REUSEADDR >
 
using send_buffer_size = socket_option::integer< SOL_SOCKET, SO_SNDBUF >
 
using send_low_watermark = socket_option::integer< SOL_SOCKET, SO_SNDLOWAT >
 
using message_flags = impl::socket::message_flags
 
using wait_type = impl::socket::wait_type
 

Public Member Functions

 basic_datagram_socket (io_context &ctx)
 
 basic_datagram_socket (io_context &ctx, const protocol_type &proto)
 
 basic_datagram_socket (const basic_datagram_socket &)=delete
 
basic_datagram_socketoperator= (const basic_datagram_socket &)=delete
 
 basic_datagram_socket (basic_datagram_socket &&other)=default
 
basic_datagram_socketoperator= (basic_datagram_socket &&)=default
 
 ~basic_datagram_socket ()=default
 
 basic_datagram_socket (io_context &ctx, const protocol_type &protocol, const native_handle_type &native_handle)
 
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > receive (const MutableBufferSequence &buffers, socket_base::message_flags flags)
 
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > receive (const MutableBufferSequence &buffers)
 
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > receive_from (const MutableBufferSequence &buffers, endpoint_type &sender, socket_base::message_flags flags)
 
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > receive_from (const MutableBufferSequence &buffers, endpoint_type &sender)
 
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > read_some (const MutableBufferSequence &buffers)
 
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > send (const ConstBufferSequence &buffers, socket_base::message_flags flags)
 
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > send (const ConstBufferSequence &buffers)
 
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > send_to (const ConstBufferSequence &buffers, const endpoint_type &recipient, socket_base::message_flags flags)
 
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > send_to (const ConstBufferSequence &buffers, const endpoint_type &recipient)
 
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > write_some (const ConstBufferSequence &buffers)
 
stdx::expected< bool, error_typeshutdown (socket_base::shutdown_type st) const
 
template<class MutableBufferSequence , class CompletionToken >
auto async_receive (const MutableBufferSequence &buffers, socket_base::message_flags flags, CompletionToken &&token)
 
template<class MutableBufferSequence , class CompletionToken >
auto async_receive (const MutableBufferSequence &buffers, CompletionToken &&token)
 
- Public Member Functions inherited from net::basic_socket< Protocol >
executor_type get_executor () noexcept
 
stdx::expected< void, error_typeassign (const protocol_type &protocol, const native_handle_type &native_handle)
 
stdx::expected< void, error_typeopen (const protocol_type &protocol=protocol_type(), int flags=0)
 
stdx::expected< void, error_typeconnect (const endpoint_type &endpoint)
 
template<class CompletionToken >
auto async_connect (const endpoint_type &endpoint, CompletionToken &&token)
 
stdx::expected< void, error_typebind (const endpoint_type &endpoint)
 
native_handle_type native_handle () const noexcept
 
template<typename SettableSocketOption >
stdx::expected< void, error_typeset_option (const SettableSocketOption &option)
 
template<typename GettableSocketOption >
stdx::expected< void, error_typeget_option (GettableSocketOption &option) const
 
stdx::expected< void, error_typeclose ()
 
stdx::expected< void, error_typecancel ()
 
stdx::expected< native_handle_type, error_typerelease ()
 
constexpr bool is_open () const
 
stdx::expected< endpoint_type, error_typelocal_endpoint () const
 
stdx::expected< endpoint_type, error_typeremote_endpoint () const
 
stdx::expected< size_t, error_typeavailable () const
 
bool non_blocking () const
 
stdx::expected< void, std::error_code > non_blocking (bool mode)
 
bool native_non_blocking () const
 
stdx::expected< void, std::error_code > native_non_blocking (bool mode)
 
stdx::expected< void, std::error_code > wait (socket_base::wait_type wt)
 
stdx::expected< void, error_typeshutdown (socket_base::shutdown_type st) const
 
template<typename CompletionToken >
auto async_wait (wait_type w, CompletionToken &&token)
 

Private Types

using __base = basic_socket< Protocol >
 

Additional Inherited Members

- Static Public Attributes inherited from net::socket_base
static constexpr message_flags message_peek = impl::socket::message_peek
 
static constexpr message_flags message_out_of_band
 
static constexpr message_flags message_do_not_route
 
static constexpr wait_type wait_read = wait_type::wait_read
 
static constexpr wait_type wait_write = wait_type::wait_write
 
static constexpr wait_type wait_error = wait_type::wait_error
 
static constexpr shutdown_type shutdown_receive
 
static constexpr shutdown_type shutdown_send = shutdown_type::shutdown_send
 
static constexpr shutdown_type shutdown_both = shutdown_type::shutdown_both
 
static const int max_listen_connections {SOMAXCONN}
 
- Protected Member Functions inherited from net::basic_socket< Protocol >
 basic_socket (io_context &ctx)
 
 basic_socket (io_context &ctx, const protocol_type &proto)
 
 basic_socket (io_context &ctx, const protocol_type &proto, const native_handle_type &native_handle)
 
 basic_socket (const basic_socket &)=delete
 
basic_socketoperator= (const basic_socket &)=delete
 
 basic_socket (basic_socket &&other)=default
 
basic_socketoperator= (basic_socket &&)=default
 
 ~basic_socket ()=default
 

Member Typedef Documentation

◆ __base

template<typename Protocol >
using net::basic_datagram_socket< Protocol >::__base = basic_socket<Protocol>
private

◆ endpoint_type

template<typename Protocol >
using net::basic_datagram_socket< Protocol >::endpoint_type = typename protocol_type::endpoint

◆ error_type

template<typename Protocol >
using net::basic_datagram_socket< Protocol >::error_type = std::error_code

◆ native_handle_type

◆ protocol_type

Constructor & Destructor Documentation

◆ basic_datagram_socket() [1/5]

template<typename Protocol >
net::basic_datagram_socket< Protocol >::basic_datagram_socket ( io_context ctx)
inlineexplicit

◆ basic_datagram_socket() [2/5]

template<typename Protocol >
net::basic_datagram_socket< Protocol >::basic_datagram_socket ( io_context ctx,
const protocol_type proto 
)
inline

◆ basic_datagram_socket() [3/5]

◆ basic_datagram_socket() [4/5]

◆ ~basic_datagram_socket()

template<typename Protocol >
net::basic_datagram_socket< Protocol >::~basic_datagram_socket ( )
default

◆ basic_datagram_socket() [5/5]

template<typename Protocol >
net::basic_datagram_socket< Protocol >::basic_datagram_socket ( io_context ctx,
const protocol_type protocol,
const native_handle_type native_handle 
)
inline

Member Function Documentation

◆ async_receive() [1/2]

template<typename Protocol >
template<class MutableBufferSequence , class CompletionToken >
auto net::basic_datagram_socket< Protocol >::async_receive ( const MutableBufferSequence &  buffers,
CompletionToken &&  token 
)
inline

◆ async_receive() [2/2]

template<typename Protocol >
template<class MutableBufferSequence , class CompletionToken >
auto net::basic_datagram_socket< Protocol >::async_receive ( const MutableBufferSequence &  buffers,
socket_base::message_flags  flags,
CompletionToken &&  token 
)
inline

◆ operator=() [1/2]

template<typename Protocol >
basic_datagram_socket & net::basic_datagram_socket< Protocol >::operator= ( basic_datagram_socket< Protocol > &&  )
default

◆ operator=() [2/2]

template<typename Protocol >
basic_datagram_socket & net::basic_datagram_socket< Protocol >::operator= ( const basic_datagram_socket< Protocol > &  )
delete

◆ read_some()

template<typename Protocol >
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::read_some ( const MutableBufferSequence &  buffers)
inline

◆ receive() [1/2]

template<typename Protocol >
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::receive ( const MutableBufferSequence &  buffers)
inline

◆ receive() [2/2]

template<typename Protocol >
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::receive ( const MutableBufferSequence &  buffers,
socket_base::message_flags  flags 
)
inline

◆ receive_from() [1/2]

template<typename Protocol >
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::receive_from ( const MutableBufferSequence &  buffers,
endpoint_type sender 
)
inline

◆ receive_from() [2/2]

template<typename Protocol >
template<class MutableBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::receive_from ( const MutableBufferSequence &  buffers,
endpoint_type sender,
socket_base::message_flags  flags 
)
inline

◆ send() [1/2]

template<typename Protocol >
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::send ( const ConstBufferSequence &  buffers)
inline

◆ send() [2/2]

template<typename Protocol >
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::send ( const ConstBufferSequence &  buffers,
socket_base::message_flags  flags 
)
inline

◆ send_to() [1/2]

template<typename Protocol >
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::send_to ( const ConstBufferSequence &  buffers,
const endpoint_type recipient 
)
inline

◆ send_to() [2/2]

template<typename Protocol >
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::send_to ( const ConstBufferSequence &  buffers,
const endpoint_type recipient,
socket_base::message_flags  flags 
)
inline

◆ shutdown()

template<typename Protocol >
stdx::expected< bool, error_type > net::basic_datagram_socket< Protocol >::shutdown ( socket_base::shutdown_type  st) const
inline

◆ write_some()

template<typename Protocol >
template<class ConstBufferSequence >
stdx::expected< size_t, std::error_code > net::basic_datagram_socket< Protocol >::write_some ( const ConstBufferSequence &  buffers)
inline

The documentation for this class was generated from the following files: