C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
caf::policy::tcp Struct Reference

Policy object for wrapping default TCP operations. More...

#include <tcp.hpp>

Static Public Member Functions

static io::network::rw_state read_some (size_t &result, io::network::native_socket fd, void *buf, size_t len)
 Reads up to len bytes from fd, writing the received data to buf.
 
static io::network::rw_state write_some (size_t &result, io::network::native_socket fd, const void *buf, size_t len)
 Writes up to len bytes from buf to fd.
 
static bool try_accept (io::network::native_socket &result, io::network::native_socket fd)
 Tries to accept a new connection from fd.
 
static constexpr bool must_read_more (io::network::native_socket, size_t)
 Always returns false.
 

Detailed Description

Policy object for wrapping default TCP operations.

Member Function Documentation

◆ must_read_more()

static constexpr bool caf::policy::tcp::must_read_more ( io::network::native_socket  ,
size_t   
)
staticconstexpr

Always returns false.

Native TCP I/O event handlers only rely on the socket buffer.

◆ read_some()

rw_state caf::policy::tcp::read_some ( size_t &  result,
io::network::native_socket  fd,
void *  buf,
size_t  len 
)
static

Reads up to len bytes from fd, writing the received data to buf.

Returns true as long as fd is readable and false if the socket has been closed or an IO error occurred. The number of read bytes is stored in result (can be 0).

◆ try_accept()

bool caf::policy::tcp::try_accept ( io::network::native_socket &  result,
io::network::native_socket  fd 
)
static

Tries to accept a new connection from fd.

On success, the new connection is stored in result. Returns true as long as

◆ write_some()

rw_state caf::policy::tcp::write_some ( size_t &  result,
io::network::native_socket  fd,
const void *  buf,
size_t  len 
)
static

Writes up to len bytes from buf to fd.

Returns true as long as fd is readable and false if the socket has been closed or an IO error occurred. The number of written bytes is stored in result (can be 0).


The documentation for this struct was generated from the following files: