C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
caf::net Namespace Reference

Contains all classes and functions related to network protocols. More...

Namespaces

namespace  dsl
 Contains building blocks to assemble protocol stacks in a declarative way.
 
namespace  http
 Contains an implementation for HTTP.
 
namespace  lp
 Contains an implementation for message exchange over length-prefix framing.
 
namespace  octet_stream
 Contains classes and utilities for transports that operate on raw octets.
 
namespace  prometheus
 Contains a scraper for exposing metrics from an actor system to Prometheus.
 
namespace  ssl
 Contains wrappers for convenient access to SSL.
 
namespace  web_socket
 Contains an implementation for message exchange over the WebSocket protocol.
 

Classes

class  actor_shell
 Enables socket managers to communicate with actors using dynamically typed messaging. More...
 
class  actor_shell_ptr
 An "owning" pointer to an actor shell in the sense that it calls quit() on the shell when going out of scope. More...
 
struct  datagram_socket
 A datagram-oriented network communication endpoint. More...
 
class  generic_lower_layer
 Bundles protocol-independent, generic member functions for (almost all) lower layers. More...
 
class  generic_upper_layer
 Bundles protocol-independent, generic member functions for (almost all) upper layers. More...
 
class  message_flow_bridge
 Translates between a message-oriented transport and data flows. More...
 
class  middleman
 Provides a network backend for running protocol stacks. More...
 
class  multiplexer
 Multiplexes any number of ::socket_manager objects with a ::socket. More...
 
struct  network_socket
 A bidirectional network communication endpoint. More...
 
struct  pipe_socket
 A unidirectional communication endpoint for inter-process communication. More...
 
struct  receive_policy
 Configures how many bytes an octet stream transport receives before calling consume on its upper layer. More...
 
struct  socket
 An internal endpoint for sending or receiving data. More...
 
class  socket_event_layer
 The lowest layer in a protocol stack. More...
 
class  socket_guard
 Closes the guarded socket when destroyed. More...
 
class  socket_manager
 Manages the lifetime of a single socket and handles any I/O events on it. More...
 
struct  stream_socket
 A connection-oriented network communication endpoint for bidirectional byte streams. More...
 
struct  tcp_accept_socket
 Represents a TCP acceptor in listening mode. More...
 
struct  tcp_stream_socket
 Represents a TCP connection. More...
 
class  this_host
 Groups functions for managing the host system. More...
 
class  typed_actor_shell
 Enables socket managers to communicate with actors using statically typed messaging. More...
 
class  typed_actor_shell_ptr
 An "owning" pointer to an actor shell in the sense that it calls quit() on the shell when going out of scope. More...
 
struct  udp_datagram_socket
 A datagram-oriented network communication endpoint for bidirectional byte transmission. More...
 

Typedefs

using setsockopt_ptr = const void *
 
using getsockopt_ptr = void *
 
using socket_send_ptr = const void *
 
using socket_recv_ptr = void *
 
using socket_size_type = unsigned
 
using multiplexer_ptr = intrusive_ptr< multiplexer >
 
using socket_manager_ptr = intrusive_ptr< socket_manager >
 
using text_buffer = std::vector< char >
 
template<class Handle >
using actor_shell_ptr_t = typename actor_shell_ptr_oracle< Handle >::type
 

Functions

template<class Socket >
expected< Socket > checked_socket (Socket fd)
 Lifts Socket to an expected<Socket> and sets an error if fd is invalid.
 
error allow_connreset (datagram_socket x, bool)
 
std::variant< size_t, seccheck_datagram_socket_io_res (std::make_signed_t< size_t > res)
 
template<class Handle = caf::actor>
actor_shell_ptr_t< Handle > make_actor_shell (actor_system &sys, async::execution_context_ptr loop)
 Creates a new actor_shell and registers it at the actor system.
 
error allow_sigpipe (network_socket x, bool new_value)
 
error allow_udp_connreset (network_socket x, bool)
 
expected< size_t > send_buffer_size (network_socket x)
 
error send_buffer_size (network_socket x, size_t capacity)
 
expected< std::string > local_addr (network_socket x)
 
expected< uint16_t > local_port (network_socket x)
 
expected< std::string > remote_addr (network_socket x)
 
expected< uint16_t > remote_port (network_socket x)
 
void shutdown_read (network_socket x)
 
void shutdown_write (network_socket x)
 
void shutdown (network_socket x)
 
expected< std::pair< pipe_socket, pipe_socket > > make_pipe ()
 
ptrdiff_t write (pipe_socket x, const_byte_span buf)
 
ptrdiff_t read (pipe_socket x, byte_span buf)
 
void close (socket fd)
 
std::errc last_socket_error ()
 
bool last_socket_error_is_temporary ()
 
std::string last_socket_error_as_string ()
 
bool would_block_or_temporarily_unavailable (int errcode)
 
bool probe (socket x)
 
error child_process_inherit (socket x, bool new_value)
 
error nonblocking (socket x, bool new_value)
 
error shutdown_read (socket x)
 
error shutdown_write (socket x)
 
template<class To , class From >
To socket_cast (From x)
 Converts between different socket types.
 
constexpr bool valid (socket x) noexcept
 Checks whether x contains a valid ID.
 
template<class Socket >
socket_guard< Socket > make_socket_guard (Socket sock)
 
expected< std::pair< stream_socket, stream_socket > > make_stream_socket_pair ()
 
error keepalive (stream_socket x, bool new_value)
 
error nodelay (stream_socket x, bool new_value)
 
ptrdiff_t read (stream_socket x, byte_span buf)
 
ptrdiff_t write (stream_socket x, const_byte_span buf)
 
ptrdiff_t write (stream_socket x, std::initializer_list< const_byte_span > bufs)
 
expected< tcp_accept_socketmake_tcp_accept_socket (ip_endpoint node, bool reuse_addr)
 
expected< tcp_accept_socketmake_tcp_accept_socket (const uri::authority_type &node, bool reuse_addr)
 
expected< tcp_accept_socketmake_tcp_accept_socket (uint16_t port, std::string addr, bool reuse_addr)
 
expected< tcp_stream_socketaccept (tcp_accept_socket x)
 
expected< tcp_stream_socketmake_connected_tcp_stream_socket (ip_endpoint node, timespan timeout)
 
expected< tcp_stream_socketmake_connected_tcp_stream_socket (const uri::authority_type &node, timespan timeout)
 
expected< tcp_stream_socketmake_connected_tcp_stream_socket (std::string host, uint16_t port, timespan timeout)
 
expected< udp_datagram_socketmake_udp_datagram_socket (ip_endpoint ep, bool reuse_addr)
 
ptrdiff_t read (udp_datagram_socket x, byte_span buf, ip_endpoint *src)
 
ptrdiff_t write (udp_datagram_socket x, const_byte_span buf, ip_endpoint ep)
 

Variables

static constexpr auto check_socket = [](auto fd) { return checked_socket(fd); }
 A function object that calls checked_socket.
 
constexpr auto invalid_socket = socket{invalid_socket_id}
 Denotes the invalid socket.
 
constexpr socket_id invalid_socket_id = -1
 Identifies the invalid socket.
 
constexpr int no_sigpipe_io_flag = MSG_NOSIGNAL
 

Detailed Description

Contains all classes and functions related to network protocols.