A unidirectional communication endpoint for inter-process communication.
More...
#include <pipe_socket.hpp>
|
(Note that these are not member symbols.)
|
| expected< std::pair< pipe_socket, pipe_socket > > CAF_NET_EXPORT | make_pipe () |
| | Creates two connected sockets.
|
| |
| ptrdiff_t CAF_NET_EXPORT | write (pipe_socket x, const_byte_span buf) |
| | Transmits data from x to its peer.
|
| |
| ptrdiff_t CAF_NET_EXPORT | read (pipe_socket x, byte_span buf) |
| | Receives data from 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 unidirectional communication endpoint for inter-process communication.
◆ make_pipe()
Creates two connected sockets.
The first socket is the read handle and the second socket is the write handle.
◆ read()
Receives data from x.
- Parameters
-
| x | Connected endpoint. |
| buf | Memory region for storing the received bytes. |
- Returns
- The number of received bytes on success, otherwise an error code.
◆ write()
Transmits data from x to its peer.
- Parameters
-
| x | Connected endpoint. |
| buf | Memory region for reading the message to send. |
- Returns
- The number of written bytes on success, otherwise an error code.
The documentation for this struct was generated from the following file:
- libcaf_net/caf/net/pipe_socket.hpp