C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::net::ssl::connection Class Reference

SSL state for a single connections. More...

#include <connection.hpp>

Public Types

using transport_type = transport
 The default transport for exchanging raw bytes over an SSL connection.
 

Public Member Functions

 connection (connection &&other)
 
connectionoperator= (connection &&other)
 
void * native_handle () const noexcept
 Retrieves the native handle from the connection.
 
std::string last_error_string (ptrdiff_t ret) const
 Returns the error code 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 Public Member Functions

static connection from_native (void *native_handle)
 Reinterprets native_handle as the native implementation type and takes ownership of the handle.
 

Detailed Description

SSL state for a single connections.

Member Function Documentation

◆ last_error_string()

std::string caf::net::ssl::connection::last_error_string ( ptrdiff_t ret) const

Returns the error code for a preceding call to connect, accept, read, write or `close.

/

Parameters
retThe (negative) result from the preceding call. errc last_error(ptrdiff_t ret) const;

/ Returns a human-readable representation of the error for a preceding call / to connect, accept, read, write or `close.

Parameters
retThe (negative) result from the preceding call.

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