qb
2.0.0.0
C++17 Actor Framework
|
Secure connection acceptance transport for SSL/TLS TCP connections. More...
#include <saccept.h>
Public Types | |
using | transport_io_type = io::tcp::ssl::listener |
Type of the underlying transport I/O. | |
using | socket_type = io::tcp::ssl::socket |
Type of the accepted socket. |
Public Member Functions | |
constexpr bool | is_secure () const noexcept |
Indicates that this transport implementation is secure. | |
io::tcp::ssl::listener & | transport () noexcept |
Get the underlying SSL TCP listener. | |
std::size_t | read () noexcept |
Accept a new secure connection. | |
void | flush (std::size_t) noexcept |
Reset the accepted socket. | |
void | eof () const noexcept |
End-of-file handling (no-op) | |
void | close () noexcept |
Close the listener. | |
io::tcp::ssl::socket & | getAccepted () |
Get the accepted secure socket. |
Secure connection acceptance transport for SSL/TLS TCP connections.
This class implements a transport layer for accepting incoming secure (SSL/TLS) TCP connections. It wraps a qb::io::tcp::ssl::listener and is used similarly to qb::io::transport::accept, but for encrypted connections.
Its read() method attempts to accept a new secure connection, performing the SSL handshake, and getAccepted() provides access to the newly established qb::io::tcp::ssl::socket.
|
inlinenoexcept |
Get the underlying SSL TCP listener.
|
inlinenoexcept |
Accept a new secure connection.
Attempts to accept a new secure connection. If successful, returns the native handle of the accepted socket which can be used for further secure communication.
|
inlinenoexcept |
Reset the accepted socket.
Unused | parameter |
Resets the last accepted socket by replacing it with a new default-constructed socket, effectively releasing the previous connection.
|
inlinenoexcept |
End-of-file handling (no-op)
This is a placeholder method with no implementation as connection acceptance doesn't have an EOF concept.
|
inlinenoexcept |
Close the listener.
Closes the underlying SSL TCP listener, stopping the acceptance of new secure connections.
|
inline |
Get the accepted secure socket.
Returns a reference to the SSL socket object representing the last accepted secure connection.