SSL state for a single connections.
More...
#include <connection.hpp>
|
using | transport_type = transport |
| The default transport for exchanging raw bytes over an SSL connection.
|
|
|
| connection (connection &&other) |
|
connection & | operator= (connection &&other) |
|
expected< connection > | make (stream_socket fd) |
|
void * | native_handle () const noexcept |
| Retrieves the native handle from the connection.
|
|
errc | last_error (ptrdiff_t ret) const |
| Returns the error code for a preceding call to connect , accept , read , write or `close.
|
|
std::string | last_error_string (ptrdiff_t ret) const |
| Returns a human-readable representation of the error for a preceding call to connect , accept , read , write or `close.
|
|
ptrdiff_t | connect () |
| Performs the client-side TLS/SSL handshake after connection to the server.
|
|
ptrdiff_t | accept () |
| Performs the server-side TLS/SSL handshake after accepting a connection from a client.
|
|
ptrdiff_t | close () |
| Gracefully closes the SSL connection without closing the socket.
|
|
ptrdiff_t | read (byte_span buf) |
| Tries to fill buf with data from the managed socket.
|
|
ptrdiff_t | write (const_byte_span buf) |
| Tries to write bytes from buf to the managed socket.
|
|
size_t | buffered () const noexcept |
| Returns the number of bytes that are currently buffered outside of the managed socket.
|
|
stream_socket | fd () const noexcept |
| Returns the file descriptor for this connection.
|
|
bool | valid () const noexcept |
|
| operator bool () const noexcept |
|
|
static connection | from_native (void *native_handle) |
| Reinterprets native_handle as the native implementation type and takes ownership of the handle.
|
|
SSL state for a single connections.
◆ last_error()
errc caf::net::ssl::connection::last_error |
( |
ptrdiff_t |
ret | ) |
const |
Returns the error code for a preceding call to connect
, accept
, read
, write
or `close.
- Parameters
-
ret | The (negative) result from the preceding call. |
◆ last_error_string()
std::string caf::net::ssl::connection::last_error_string |
( |
ptrdiff_t |
ret | ) |
const |
Returns a human-readable representation of the error for a preceding call to connect
, accept
, read
, write
or `close.
- Parameters
-
ret | The (negative) result from the preceding call. |
The documentation for this class was generated from the following files:
- libcaf_net/caf/net/ssl/connection.hpp
- libcaf_net/caf/net/ssl/connection.cpp