C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::net::pipe_socket Struct Reference

A unidirectional communication endpoint for inter-process communication. More...

#include <pipe_socket.hpp>

Inheritance diagram for caf::net::pipe_socket:
caf::net::socket caf::detail::comparable< socket >

Public Types

using super = socket
 

Related Symbols

(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.
 

Additional Inherited Members

- Public Member Functions inherited from caf::net::socket
constexpr socket (socket_id id) noexcept
 
constexpr socket (const socket &other) noexcept=default
 
socketoperator= (const socket &other) noexcept=default
 
constexpr signed_socket_id compare (socket other) const noexcept
 
constexpr operator bool () const noexcept
 
constexpr bool operator! () const noexcept
 
constexpr socket fd () const noexcept
 
- Public Attributes inherited from caf::net::socket
socket_id id
 

Detailed Description

A unidirectional communication endpoint for inter-process communication.

Friends And Related Symbol Documentation

◆ make_pipe()

expected< std::pair< pipe_socket, pipe_socket > > CAF_NET_EXPORT make_pipe ( )
related

Creates two connected sockets.

The first socket is the read handle and the second socket is the write handle.

◆ read()

ptrdiff_t CAF_NET_EXPORT read ( pipe_socket x,
byte_span buf )
related

Receives data from x.

Parameters
xConnected endpoint.
bufMemory region for storing the received bytes.
Returns
The number of received bytes on success, otherwise an error code.

◆ write()

ptrdiff_t CAF_NET_EXPORT write ( pipe_socket x,
const_byte_span buf )
related

Transmits data from x to its peer.

Parameters
xConnected endpoint.
bufMemory 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: