|
join 1.0
lightweight network framework library
|
basic TLS acceptor class. More...
#include <acceptor.hpp>


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
| using | Stream = typename Protocol::Stream |
Public Types inherited from join::BasicStreamAcceptor< Protocol > | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
| using | Stream = typename Protocol::Stream |
Public Member Functions | |
| BasicTlsAcceptor () | |
| create the acceptor instance. | |
| BasicTlsAcceptor (const BasicTlsAcceptor &other)=delete | |
| copy constructor. | |
| BasicTlsAcceptor & | operator= (const BasicTlsAcceptor &other)=delete |
| copy assignment operator. | |
| BasicTlsAcceptor (BasicTlsAcceptor &&other) | |
| move constructor. | |
| BasicTlsAcceptor & | operator= (BasicTlsAcceptor &&other) |
| move assignment operator. | |
| virtual Socket | accept () const override |
| accept new connection and fill in the client object with connection parameters. | |
| virtual Socket | acceptEncrypted () const |
| accept new connection and fill in the client object with connection parameters. | |
| virtual Stream | acceptStreamEncrypted () const |
| accept new connection and fill in the client object with connection parameters. | |
| int | setCertificate (const std::string &cert, const std::string &key="") |
| set the certificate and the private key. | |
| int | setCaCertificate (const std::string &caFile) |
| Set the location of the trusted CA certificate. | |
| void | setVerify (bool verify, int depth=-1) |
| Enable/Disable the verification of the peer certificate. | |
| int | setCipher (const std::string &cipher) |
| set the cipher list (TLSv1.2 and below). | |
| int | setCipher_1_3 (const std::string &cipher) |
| set the cipher list (TLSv1.3). | |
Public Member Functions inherited from join::BasicStreamAcceptor< Protocol > | |
| BasicStreamAcceptor ()=default | |
| create the acceptor instance. | |
| BasicStreamAcceptor (const BasicStreamAcceptor &other)=delete | |
| copy constructor. | |
| BasicStreamAcceptor & | operator= (const BasicStreamAcceptor &other)=delete |
| copy assignment operator. | |
| BasicStreamAcceptor (BasicStreamAcceptor &&other) | |
| move constructor. | |
| BasicStreamAcceptor & | operator= (BasicStreamAcceptor &&other) |
| move assignment operator. | |
| virtual | ~BasicStreamAcceptor () |
| destroy instance. | |
| virtual int | create (const Endpoint &endpoint) noexcept |
| create acceptor | |
| virtual void | close () noexcept |
| close acceptor. | |
| virtual Stream | acceptStream () const |
| accept new connection and fill in the client object with connection parameters. | |
| Endpoint | localEndpoint () const |
| determine the local endpoint associated with this socket. | |
| bool | opened () const noexcept |
| check if the socket is opened. | |
| int | family () const noexcept |
| get address family. | |
| int | type () const noexcept |
| get the protocol communication semantic. | |
| int | protocol () const noexcept |
| get acceptor protocol. | |
| int | handle () const noexcept override |
| get socket native handle. | |
Public Member Functions inherited from join::EventHandler | |
| EventHandler ()=default | |
| create instance. | |
| virtual | ~EventHandler ()=default |
| destroy instance. | |
Static Protected Member Functions | |
| static DH * | getDh2236 () |
| generate openssl Diffie-Hellman parameters. | |
Protected Attributes | |
| join::SslCtxPtr | _tlsContext |
| SSL/TLS context. | |
| int | _sessionId = 0 |
| SSL session id. | |
Protected Attributes inherited from join::BasicStreamAcceptor< Protocol > | |
| int | _handle = -1 |
| socket handle. | |
| Protocol | _protocol |
| protocol. | |
Additional Inherited Members | |
Protected Member Functions inherited from join::EventHandler | |
| virtual void | onReceive () |
| method called when data are ready to be read on handle. | |
| virtual void | onClose () |
| method called when handle is closed. | |
| virtual void | onError () |
| method called when an error occured on handle. | |
basic TLS acceptor class.
| using join::BasicTlsAcceptor< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicTlsAcceptor< Protocol >::Socket = typename Protocol::Socket |
| using join::BasicTlsAcceptor< Protocol >::Stream = typename Protocol::Stream |
|
inline |
create the acceptor instance.
|
delete |
copy constructor.
| other | other object to copy. |
|
inline |
move constructor.
| other | other object to move. |
|
inlineoverridevirtual |
accept new connection and fill in the client object with connection parameters.
Reimplemented from join::BasicStreamAcceptor< Protocol >.
|
inlinevirtual |
accept new connection and fill in the client object with connection parameters.
|
inlinevirtual |
accept new connection and fill in the client object with connection parameters.
|
inlinestaticprotected |
generate openssl Diffie-Hellman parameters.
|
inline |
move assignment operator.
| other | other object to assign. |
|
delete |
copy assignment operator.
| other | other object to assign. |
|
inline |
Set the location of the trusted CA certificate.
| caFile | path of the trusted CA certificate file. |
|
inline |
set the certificate and the private key.
| cert | certificate path. |
| key | private key path. |
|
inline |
set the cipher list (TLSv1.2 and below).
| cipher | the cipher list. |
|
inline |
set the cipher list (TLSv1.3).
| cipher | the cipher list. |
|
inline |
Enable/Disable the verification of the peer certificate.
| verify | Enable peer verification if set to true, false otherwise. |
| depth | The maximum certificate verification depth (default: no limit). |
|
protected |
SSL session id.
|
protected |
SSL/TLS context.