C++ Actor Framework 0.19
|
Configures a transport object. More...
#include <policy.hpp>
Inherited by caf::net::ssl::transport::policy_impl.
Public Member Functions | |
virtual ptrdiff_t | read (stream_socket x, byte_span buf) |
Reads data from the socket into the buffer. | |
virtual ptrdiff_t | write (stream_socket x, const_byte_span buf) |
Writes data from the buffer to the socket. | |
virtual errc | last_error (stream_socket, ptrdiff_t) |
Returns the last socket error on this thread. | |
virtual ptrdiff_t | connect (stream_socket x) |
Checks whether connecting a non-blocking socket was successful. | |
virtual ptrdiff_t | accept (stream_socket) |
Convenience function that always returns 1. | |
virtual size_t | buffered () const noexcept |
Returns the number of bytes that are buffered internally and available for immediate read. | |
Configures a transport object.
The default implementation simply forwards to the free functions of stream_socket.
|
virtual |
Convenience function that always returns 1.
Exists to make writing code against multiple policies easier by providing the same interface.