MySQL 8.0.39
Source Code Documentation
net::basic_socket_impl< Protocol > Class Template Reference

#include <socket.h>

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

Classes

class  IoControl
 

Public Types

using __base = basic_socket_impl_base
 
using executor_type = io_context::executor_type
 
using protocol_type = Protocol
 
using endpoint_type = typename protocol_type::endpoint
 
using error_type = std::error_code
 
using socket_type = typename protocol_type::socket
 
using io_control_bytes_avail_recv = IoControl< FIONREAD, int >
 
using io_control_at_mark = IoControl< SIOCATMARK, int >
 
using io_control_bytes_avail_send = IoControl< TIOCOUTQ, int >
 
- Public Types inherited from net::basic_socket_impl_base
using native_handle_type = impl::socket::native_handle_type
 
using executor_type = io_context::executor_type
 

Public Member Functions

constexpr basic_socket_impl (io_context &ctx) noexcept
 
 basic_socket_impl (const basic_socket_impl &)=delete
 
basic_socket_imploperator= (const basic_socket_impl &)=delete
 
 basic_socket_impl (basic_socket_impl &&rhs)=default
 
basic_socket_imploperator= (basic_socket_impl &&rhs) noexcept
 
 ~basic_socket_impl ()
 
stdx::expected< void, error_typeopen (const protocol_type &protocol=protocol_type(), int flags=0)
 
stdx::expected< void, error_typeassign (const protocol_type &protocol, const native_handle_type &native_handle)
 
stdx::expected< void, error_typebind (const endpoint_type &endpoint)
 
stdx::expected< socket_type, error_typeaccept (io_context &io_ctx, struct sockaddr *endpoint_data, socklen_t *endpoint_size, int flags=0)
 
stdx::expected< socket_type, error_typeaccept (io_context &io_ctx, int flags=0)
 
stdx::expected< socket_type, error_typeaccept (io_context &io_ctx, endpoint_type &endpoint, int flags=0)
 
stdx::expected< void, error_typelisten (int backlog=socket_base::max_listen_connections)
 
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< endpoint_type, error_typelocal_endpoint () const
 
stdx::expected< endpoint_type, error_typeremote_endpoint () const
 
template<class IoControlCommand >
stdx::expected< void, error_typeio_control (IoControlCommand &cmd) const
 
stdx::expected< size_t, error_typeavailable () const
 
stdx::expected< bool, error_typeat_mark () const
 
stdx::expected< void, error_typeshutdown (socket_base::shutdown_type st) const
 
stdx::expected< void, std::error_code > wait (socket_base::wait_type wt)
 
- Public Member Functions inherited from net::basic_socket_impl_base
constexpr basic_socket_impl_base (io_context &ctx)
 
 basic_socket_impl_base (const basic_socket_impl_base &rhs)=delete
 
basic_socket_impl_baseoperator= (const basic_socket_impl_base &rhs)=delete
 
 basic_socket_impl_base (basic_socket_impl_base &&rhs) noexcept
 
basic_socket_impl_baseoperator= (basic_socket_impl_base &&rhs) noexcept
 
 ~basic_socket_impl_base ()=default
 
constexpr native_handle_type native_handle () const noexcept
 
constexpr bool is_open () const noexcept
 
constexpr 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)
 
executor_type get_executor () noexcept
 
stdx::expected< void, std::error_code > close ()
 
stdx::expected< void, std::error_code > cancel ()
 
stdx::expected< native_handle_type, std::error_code > release ()
 

Private Attributes

protocol_type protocol_ {endpoint_type{}.protocol()}
 

Additional Inherited Members

- Protected Attributes inherited from net::basic_socket_impl_base
native_handle_type native_handle_ {impl::socket::kInvalidSocket}
 
bool non_blocking_ {false}
 
char native_non_blocking_
 
io_contextio_ctx_
 

Member Typedef Documentation

◆ __base

◆ endpoint_type

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

◆ error_type

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

◆ executor_type

◆ io_control_at_mark

template<typename Protocol >
using net::basic_socket_impl< Protocol >::io_control_at_mark = IoControl<SIOCATMARK, int>

◆ io_control_bytes_avail_recv

template<typename Protocol >
using net::basic_socket_impl< Protocol >::io_control_bytes_avail_recv = IoControl<FIONREAD, int>

◆ io_control_bytes_avail_send

template<typename Protocol >
using net::basic_socket_impl< Protocol >::io_control_bytes_avail_send = IoControl<TIOCOUTQ, int>

◆ protocol_type

◆ socket_type

template<typename Protocol >
using net::basic_socket_impl< Protocol >::socket_type = typename protocol_type::socket

Constructor & Destructor Documentation

◆ basic_socket_impl() [1/3]

template<typename Protocol >
constexpr net::basic_socket_impl< Protocol >::basic_socket_impl ( io_context ctx)
inlineexplicitconstexprnoexcept

◆ basic_socket_impl() [2/3]

template<typename Protocol >
net::basic_socket_impl< Protocol >::basic_socket_impl ( const basic_socket_impl< Protocol > &  )
delete

◆ basic_socket_impl() [3/3]

template<typename Protocol >
net::basic_socket_impl< Protocol >::basic_socket_impl ( basic_socket_impl< Protocol > &&  rhs)
default

◆ ~basic_socket_impl()

template<typename Protocol >
net::basic_socket_impl< Protocol >::~basic_socket_impl ( )
inline

Member Function Documentation

◆ accept() [1/3]

template<typename Protocol >
stdx::expected< socket_type, error_type > net::basic_socket_impl< Protocol >::accept ( io_context io_ctx,
endpoint_type endpoint,
int  flags = 0 
)
inline

◆ accept() [2/3]

template<typename Protocol >
stdx::expected< socket_type, error_type > net::basic_socket_impl< Protocol >::accept ( io_context io_ctx,
int  flags = 0 
)
inline

◆ accept() [3/3]

template<typename Protocol >
stdx::expected< socket_type, error_type > net::basic_socket_impl< Protocol >::accept ( io_context io_ctx,
struct sockaddr endpoint_data,
socklen_t *  endpoint_size,
int  flags = 0 
)
inline

◆ assign()

template<typename Protocol >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::assign ( const protocol_type protocol,
const native_handle_type native_handle 
)
inline

◆ at_mark()

template<typename Protocol >
stdx::expected< bool, error_type > net::basic_socket_impl< Protocol >::at_mark ( ) const
inline

◆ available()

template<typename Protocol >
stdx::expected< size_t, error_type > net::basic_socket_impl< Protocol >::available ( ) const
inline

◆ bind()

template<typename Protocol >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::bind ( const endpoint_type endpoint)
inline

◆ get_option()

template<typename Protocol >
template<typename GettableSocketOption >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::get_option ( GettableSocketOption &  option) const
inline

◆ io_control()

template<typename Protocol >
template<class IoControlCommand >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::io_control ( IoControlCommand &  cmd) const
inline

◆ listen()

template<typename Protocol >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::listen ( int  backlog = socket_base::max_listen_connections)
inline

◆ local_endpoint()

template<typename Protocol >
stdx::expected< endpoint_type, error_type > net::basic_socket_impl< Protocol >::local_endpoint ( ) const
inline

◆ open()

template<typename Protocol >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::open ( const protocol_type protocol = protocol_type(),
int  flags = 0 
)
inline

◆ operator=() [1/2]

template<typename Protocol >
basic_socket_impl & net::basic_socket_impl< Protocol >::operator= ( basic_socket_impl< Protocol > &&  rhs)
inlinenoexcept

◆ operator=() [2/2]

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

◆ remote_endpoint()

template<typename Protocol >
stdx::expected< endpoint_type, error_type > net::basic_socket_impl< Protocol >::remote_endpoint ( ) const
inline

◆ set_option()

template<typename Protocol >
template<typename SettableSocketOption >
stdx::expected< void, error_type > net::basic_socket_impl< Protocol >::set_option ( const SettableSocketOption &  option)
inline

◆ shutdown()

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

◆ wait()

template<typename Protocol >
stdx::expected< void, std::error_code > net::basic_socket_impl< Protocol >::wait ( socket_base::wait_type  wt)
inline

Member Data Documentation

◆ protocol_

template<typename Protocol >
protocol_type net::basic_socket_impl< Protocol >::protocol_ {endpoint_type{}.protocol()}
private

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