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

A dialog that facilitates asynchronous operations on the socket by the executor. More...

#include <io/socket/socket_dialog.hpp>

Public Types

using executor_type = ::io::execution::executor< Mux >
 The executor type for this dialog.
 

Public Member Functions

 operator bool () const noexcept
 Checks if the socket_dialog is valid.
 
 operator native_socket_type () const
 Casts the socket dialog to a native socket value.
 

Public Attributes

std::weak_ptr< executor_typeexecutor
 A weak pointer to the executor that owns the socket.
 
std::shared_ptr< socket_handlesocket
 A shared pointer to the socket handle.
 

Detailed Description

template<Multiplexer Mux>
struct io::socket::socket_dialog< Mux >

A dialog that facilitates asynchronous operations on the socket by the executor.

Template Parameters
MuxThe multiplexer type.

Member Function Documentation

◆ operator bool()

template<Multiplexer Mux>
io::socket::socket_dialog< Mux >::operator bool ( ) const
explicitnoexcept

Checks if the socket_dialog is valid.

Returns
true if the socket_dialog is valid, false otherwise.

◆ operator native_socket_type()

template<Multiplexer Mux>
io::socket::socket_dialog< Mux >::operator native_socket_type ( ) const
explicit

Casts the socket dialog to a native socket value.

Exceptions
std::invalid_argumentif the socket is nullptr.
Returns
A copy of the native socket handle.

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