AsyncBerkeley
Asynchronous Berkeley sockets. Simple.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
io::execution::executor< Mux > Class Template Reference

An executor that uses a multiplexer to wait for events. More...

#include <io/execution/executor.hpp>

Inherits io::execution::Mux.

Public Member Functions

template<typename... Args>
auto set (Args &&...args) -> decltype(auto)
 Sets a completion handler for an event.
 
auto on_empty () -> decltype(auto)
 Sends a notice when the executor is empty.
 

Static Public Member Functions

template<SocketLike Socket>
static auto push (std::shared_ptr< Socket > socket) -> decltype(auto)
 Configures the socket to be non-blocking.
 
template<SocketLike Socket>
static auto push (Socket &&handle) -> decltype(auto)
 Pushes a socket handle to the collection.
 
template<typename... Args>
static auto emplace (Args &&...args) -> std::shared_ptr< socket_handle >
 Emplaces a socket handle in the collection.
 

Friends

class basic_triggers< Mux >
 

Detailed Description

template<Multiplexer Mux>
class io::execution::executor< Mux >

An executor that uses a multiplexer to wait for events.

Template Parameters
MuxThe multiplexer type.

Member Function Documentation

◆ emplace()

template<Multiplexer Mux>
template<typename... Args>
static auto io::execution::executor< Mux >::emplace ( Args &&...  args) -> std::shared_ptr<socket_handle>
inlinestatic

Emplaces a socket handle in the collection.

Parameters
...argsThe arguments to forward to the socket handle constructor.
Returns
A shared pointer to the emplaced socket handle.

◆ on_empty()

template<Multiplexer Mux>
auto io::execution::executor< Mux >::on_empty ( ) -> decltype(auto)
inline

Sends a notice when the executor is empty.

Returns
A sender that notifies when the executor is empty.

◆ push() [1/2]

template<Multiplexer Mux>
template<SocketLike Socket>
static auto io::execution::executor< Mux >::push ( Socket &&  handle) -> decltype(auto)
inlinestatic

Pushes a socket handle to the collection.

Parameters
handleThe socket handle to push.
Returns
A weak pointer to the pushed socket handle.

◆ push() [2/2]

template<Multiplexer Mux>
template<SocketLike Socket>
static auto io::execution::executor< Mux >::push ( std::shared_ptr< Socket >  socket) -> decltype(auto)
inlinestatic

Configures the socket to be non-blocking.

This overload can be used to create socket_dialogs using a custom allocator for the socket handle.

Template Parameters
SocketA socket handle like object.
Parameters
socketA shared pointer to a non-blocking socket.
Returns
A shared pointer to a non-blocking socket.

◆ set()

template<Multiplexer Mux>
template<typename... Args>
auto io::execution::executor< Mux >::set ( Args &&...  args) -> decltype(auto)
inline

Sets a completion handler for an event.

Parameters
argsThe arguments to forward to the multiplexer.
Template Parameters
ArgsThe types of the perfectly forwarded arguments.
Returns
A sender, scoped to the lifetime of the executor.

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