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


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
| using | Transport = typename Protocol::Transport::Socket |
| using | Mode = typename Socket::Mode |
Public Types inherited from join::BasicSocketStream< Protocol > | |
| using | SocketStreambuf = BasicSocketStreambuf<Protocol> |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
Public Member Functions | |
| BasicTlsStream () | |
| default constructor. | |
| BasicTlsStream (TlsContext ctx, Mode mode=Mode::NonBlocking) | |
| construct the TLS stream instance using the given context. | |
| BasicTlsStream (Socket &&socket) | |
| construct the TLS stream by moving an already wrapped TLS socket in. | |
| BasicTlsStream (Transport &&socket, TlsContext ctx=TlsContext{}) | |
| construct the TLS stream by wrapping an already connected transport socket. | |
| BasicTlsStream (const BasicTlsStream &other)=delete | |
| copy constructor. | |
| BasicTlsStream & | operator= (const BasicTlsStream &other)=delete |
| copy assignment operator. | |
| BasicTlsStream (BasicTlsStream &&other) | |
| move constructor. | |
| BasicTlsStream & | operator= (BasicTlsStream &&other) |
| move assignment operator. | |
| virtual | ~BasicTlsStream ()=default |
| destroy the TLS stream instance. | |
| void | handshake () |
| perform the TLS handshake. | |
| void | shutdown () |
| perform the TLS shutdown (send a close_notify alert). | |
| bool | encrypted () |
| check if the stream is encrypted. | |
Public Member Functions inherited from join::BasicSocketStream< Protocol > | |
| BasicSocketStream () | |
| default constructor. | |
| BasicSocketStream (Socket &&socket) | |
| construct the socket stream by moving an existing socket in. | |
| BasicSocketStream (const BasicSocketStream &other)=delete | |
| copy constructor. | |
| BasicSocketStream & | operator= (const BasicSocketStream &other)=delete |
| copy assignment operator. | |
| BasicSocketStream (BasicSocketStream &&other) | |
| move constructor. | |
| BasicSocketStream & | operator= (BasicSocketStream &&other) |
| move assignment operator. | |
| virtual | ~BasicSocketStream ()=default |
| destroy the socket stream instance. | |
| virtual void | bind (const Endpoint &endpoint) |
| assigns the specified endpoint to the socket. | |
| virtual void | connect (const Endpoint &endpoint) |
| make a connection to the given endpoint. | |
| virtual void | disconnect () |
| shutdown the connection. | |
| virtual void | close () |
| close the connection. | |
| Endpoint | localEndpoint () |
| determine the local endpoint associated with this socket. | |
| Endpoint | remoteEndpoint () |
| determine the remote endpoint associated with this socket. | |
| bool | opened () |
| check if the socket is opened. | |
| bool | connected () |
| check if the socket is connected. | |
| void | timeout (std::chrono::nanoseconds timeout) |
| set the socket timeout. | |
| std::chrono::nanoseconds | timeout () const |
| get the current timeout duration. | |
| Socket & | socket () |
| get the nested socket. | |
Additional Inherited Members | |
Protected Attributes inherited from join::BasicSocketStream< Protocol > | |
| SocketStreambuf | _sockbuf |
| associated stream buffer. | |
TLS stream class.
| using join::BasicTlsStream< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicTlsStream< Protocol >::Mode = typename Socket::Mode |
| using join::BasicTlsStream< Protocol >::Socket = typename Protocol::Socket |
| using join::BasicTlsStream< Protocol >::Transport = typename Protocol::Transport::Socket |
|
inline |
default constructor.
|
inlineexplicit |
construct the TLS stream instance using the given context.
| ctx | TLS context to use. |
| mode | socket blocking mode. |
|
inlineexplicit |
construct the TLS stream by moving an already wrapped TLS socket in.
| socket | TLS socket to move in. |
|
inlineexplicit |
construct the TLS stream by wrapping an already connected transport socket.
| socket | connected transport socket to move in (e.g. as returned by accept ()). |
| ctx | TLS context to use for the encryption layer. |
|
delete |
copy constructor.
| other | other object to copy. |
|
inline |
move constructor.
| other | other object to move. |
|
virtualdefault |
destroy the TLS stream instance.
|
inline |
check if the stream is encrypted.
|
inline |
perform the TLS handshake.
|
inline |
move assignment operator.
| other | other object to assign. |
|
delete |
copy assignment operator.
| other | other object to assign. |
|
inline |
perform the TLS shutdown (send a close_notify alert).