C++ Actor Framework 1.0.0
|
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 . | |
Policy object for wrapping default TCP operations.
|
staticconstexpr |
Always returns false
.
Native TCP I/O event handlers only rely on the socket buffer.
|
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).
|
static |
Tries to accept a new connection from fd
.
On success, the new connection is stored in result
. Returns true as long as
|
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).