|
| ssize_t | readFrom (char *buf, size_t len, Endpoint *endpoint=nullptr) noexcept |
| | read data on the socket.
|
| |
| ssize_t | writeTo (const char *buf, size_t len, const Endpoint &endpoint) noexcept |
| | write data on the socket.
|
| |
| int | ttl () const noexcept |
| | returns the Time-To-Live value.
|
| |
| | BasicTls (TlsContext ctx, Mode mode=Mode::NonBlocking) noexcept |
| | create a TLS decorator with an internally created socket.
|
| |
| | BasicTls (UnderlyingSocket &&socket) noexcept |
| | create a TLS decorator taking ownership of the given socket, without context.
|
| |
| | BasicTls (UnderlyingSocket &&socket, TlsContext ctx) noexcept |
| | create a TLS decorator taking ownership of the given socket.
|
| |
| | BasicTls (const BasicTls &other)=delete |
| | copy constructor.
|
| |
| BasicTls & | operator= (const BasicTls &other)=delete |
| | copy assignment operator.
|
| |
| | BasicTls (BasicTls &&other) noexcept |
| | move constructor.
|
| |
| BasicTls & | operator= (BasicTls &&other) noexcept |
| | move assignment operator.
|
| |
| virtual | ~BasicTls ()=default |
| | destroy the instance.
|
| |
| int | open (const Protocol &protocol=Protocol()) noexcept |
| | open the underlying socket using the given protocol.
|
| |
| bool | opened () const noexcept |
| | check if the underlying socket is opened.
|
| |
| int | bind (const Endpoint &ep) noexcept |
| | assigns the specified endpoint to the underlying socket.
|
| |
| int | bindToDevice (const std::string &dev) noexcept |
| | assigns the specified device to the underlying socket.
|
| |
| int | connect (const Endpoint &ep) noexcept |
| | connect the underlying socket to the remote endpoint.
|
| |
| bool | connected () noexcept |
| | check if the underlying socket is connected.
|
| |
| int | deferHandshake () |
| | set the TLS layer up without negotiating immediately.
|
| |
| int | handshake () |
| | perform the TLS handshake.
|
| |
| bool | waitHandshake () |
| | block until TLS handshake is finished.
|
| |
| bool | waitHandshake (std::chrono::nanoseconds timeout) |
| | block until TLS handshake is finished, giving up after the given duration.
|
| |
| virtual bool | waitHandshake (TimePoint deadline) |
| | block until TLS handshake is finished, giving up at the given time point.
|
| |
| bool | encrypted () const noexcept |
| | check if the stream is encrypted.
|
| |
| int | shutdown () noexcept |
| | Perform the TLS shutdown.
|
| |
| bool | waitShutdown () noexcept |
| | block until TLS shutdown is finished.
|
| |
| bool | waitShutdown (std::chrono::nanoseconds timeout) noexcept |
| | block until TLS shutdown is finished, giving up after the given duration.
|
| |
| bool | waitShutdown (TimePoint deadline) noexcept |
| | block until TLS shutdown is finished, giving up at the given time point.
|
| |
| int | disconnect () noexcept |
| | disconnect the underlying socket from the remote endpoint.
|
| |
| void | close () noexcept |
| | close the socket handle.
|
| |
| bool | waitReadyRead () const noexcept |
| | block until new data is available for reading.
|
| |
| bool | waitReadyRead (std::chrono::nanoseconds timeout) const noexcept |
| | block until new data is available for reading, giving up after the given duration.
|
| |
| bool | waitReadyRead (TimePoint deadline) const noexcept |
| | block until new data is available for reading, giving up at the given time point.
|
| |
| ssize_t | read (char *buf, size_t len) noexcept |
| | read data from the TLS stream.
|
| |
| int | readExactly (char *data, size_t size) |
| | read data until size is reached or an error occurred.
|
| |
| int | readExactly (char *data, size_t size, std::chrono::nanoseconds timeout) |
| | read data until size is reached, an error occurred or the given duration elapsed.
|
| |
| int | readExactly (char *data, size_t size, TimePoint deadline) |
| | read data until size is reached, an error occurred or the deadline expired.
|
| |
| bool | waitReadyWrite () const noexcept |
| | block until at least one byte can be written on the socket.
|
| |
| bool | waitReadyWrite (std::chrono::nanoseconds timeout) const noexcept |
| | block until at least one byte can be written on the socket, giving up after the given duration.
|
| |
| bool | waitReadyWrite (TimePoint deadline) const noexcept |
| | block until at least one byte can be written, giving up at the given time point.
|
| |
| ssize_t | write (const char *buf, size_t len) noexcept |
| | write data to the TLS stream.
|
| |
| int | writeExactly (const char *data, size_t size) |
| | write data until size is reached or an error occurred.
|
| |
| int | writeExactly (const char *data, size_t size, std::chrono::nanoseconds timeout) |
| | write data until size is reached, an error occurred or the given duration elapsed.
|
| |
| int | writeExactly (const char *data, size_t size, TimePoint deadline) |
| | write data until size is reached, an error occurred or the deadline expired.
|
| |
| void | setMode (Mode mode) noexcept |
| | set the mode of the underlying socket.
|
| |
| int | setOption (Option opt, int val) noexcept |
| | set an option for the underlying socket.
|
| |
| int | handle () const noexcept |
| | get the underlying socket handle.
|
| |
| int | family () const noexcept |
| | get the underlying socket address family.
|
| |
| int | type () const noexcept |
| | get the underlying socket type.
|
| |
| int | protocol () const noexcept |
| | get the underlying protocol.
|
| |
| int | mtu () const noexcept |
| | get the maximum transmission unit.
|
| |
| Endpoint | localEndpoint () const noexcept |
| | get the local endpoint.
|
| |
| Endpoint | remoteEndpoint () const |
| | get the remote endpoint.
|
| |
template<class Protocol>
class join::BasicDtlsWrapper< Protocol >
DTLS decorator for datagram sockets.