A connection-oriented network communication endpoint for bidirectional byte streams.
More...
|
(Note that these are not member symbols.)
|
expected< std::pair< stream_socket, stream_socket > > CAF_NET_EXPORT | make_stream_socket_pair () |
| Creates two connected sockets to mimic network communication (usually for testing purposes).
|
|
error CAF_NET_EXPORT | nodelay (stream_socket x, bool new_value) |
| Enables or disables Nagle's algorithm on x .
|
|
ptrdiff_t CAF_NET_EXPORT | read (stream_socket x, byte_span buf) |
| Receives data from x .
|
|
ptrdiff_t CAF_NET_EXPORT | write (stream_socket x, const_byte_span buf) |
| Sends data to x .
|
|
ptrdiff_t CAF_NET_EXPORT | write (stream_socket x, std::initializer_list< const_byte_span > bufs) |
| Transmits data from x to its peer.
|
|
error CAF_NET_EXPORT | allow_sigpipe (network_socket x, bool new_value) |
| Enables or disables SIGPIPE events from x .
|
|
error CAF_NET_EXPORT | allow_udp_connreset (network_socket x, bool new_value) |
| Enables or disables SIO_UDP_CONNRESET error on x .
|
|
expected< size_t > CAF_NET_EXPORT | send_buffer_size (network_socket x) |
| Get the socket buffer size for x .
|
|
error CAF_NET_EXPORT | send_buffer_size (network_socket x, size_t capacity) |
| Set the socket buffer size for x .
|
|
expected< uint16_t > CAF_NET_EXPORT | local_port (network_socket x) |
| Returns the locally assigned port of x .
|
|
expected< std::string > CAF_NET_EXPORT | local_addr (network_socket x) |
| Returns the locally assigned address of x .
|
|
expected< uint16_t > CAF_NET_EXPORT | remote_port (network_socket x) |
| Returns the port used by the remote host of x .
|
|
expected< std::string > CAF_NET_EXPORT | remote_addr (network_socket x) |
| Returns the remote host address of x .
|
|
error CAF_NET_EXPORT | keepalive (stream_socket x, bool new_value) |
| Enables or disables keepalive on x .
|
|
using | socket_id = int |
| Platform-specific representation of a socket.
|
|
using | signed_socket_id = std::make_signed_t<socket_id> |
| Signed counterpart of socket_id .
|
|
template<class Inspector > |
bool | inspect (Inspector &f, socket &x) |
|
void CAF_NET_EXPORT | close (socket x) |
| Closes socket x .
|
|
std::errc CAF_NET_EXPORT | last_socket_error () |
| Returns the last socket error in this thread as an integer.
|
|
bool CAF_NET_EXPORT | last_socket_error_is_temporary () |
| Checks whether last_socket_error() would return an error code that indicates a temporary error.
|
|
std::string CAF_NET_EXPORT | last_socket_error_as_string () |
| Returns the last socket error as human-readable string.
|
|
bool CAF_NET_EXPORT | probe (socket x) |
| Queries whether x is a valid and connected socket by reading the socket option SO_ERROR .
|
|
error CAF_NET_EXPORT | child_process_inherit (socket x, bool new_value) |
| Sets x to be inherited by child processes if new_value == true or not if new_value == false .
|
|
error CAF_NET_EXPORT | nonblocking (socket x, bool new_value) |
| Enables or disables nonblocking I/O on x .
|
|
error CAF_NET_EXPORT | shutdown_read (socket x) |
| Disallows further reads from the socket.
|
|
error CAF_NET_EXPORT | shutdown_write (socket x) |
| Disallows further writes to the socket.
|
|
A connection-oriented network communication endpoint for bidirectional byte streams.