class

DTLS::Socket

Inherits IO::Buffered < IO < Reference < Object

Instance methods

alpn_protocol

Returns the negotiated ALPN protocol (eg: "h2") of nil if no protocol was negotiated.

cipher

Returns the current cipher used by this socket.

closed?

Returns true if this IO is closed.

IO defines returns false, but including types may override.

finalize
hostname

Returns the hostname provided through Server Name Indication (SNI)

local_address
read_timeout
read_timeout=(value)
remote_address
sync_close=(sync_close : Bool)

If #sync_close? is true, closing this socket will close the underlying IO.

sync_close?

If #sync_close? is true, closing this socket will close the underlying IO.

tls_version

Returns the name of the TLS protocol version used by this socket.

unbuffered_close

ameba:disable Metrics/CyclomaticComplexity

unbuffered_flush

Flushes the wrapped IO.

TODO: Add return type restriction Nil

unbuffered_read(slice : Bytes)

Reads at most slice.size bytes from the wrapped IO into slice. Returns the number of bytes read.

TODO: Add return type restriction Int32

unbuffered_rewind

Rewinds the wrapped IO.

TODO: Add return type restriction Nil

unbuffered_write(slice : Bytes)

Writes slice entirely into the wrapped IO.

TODO: Add return type restriction Nil

write_timeout
write_timeout=(value)

Nested types