abstract class DTLS::Socket
- DTLS::Socket
- IO
- Reference
- Object
Included Modules
- IO::Buffered
Direct Known Subclasses
Defined in:
dtls/client.crInstance Method Summary
-
#alpn_protocol
Returns the negotiated ALPN protocol (eg:
"h2"
) ofnil
if no protocol was negotiated. -
#cipher : String
Returns the current cipher used by this socket.
-
#closed? : Bool
Returns
true
if thisIO
is closed. - #finalize
-
#hostname : String | Nil
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?
istrue
, closing this socket will close the underlying IO. -
#sync_close? : Bool
If
#sync_close?
istrue
, closing this socket will close the underlying IO. -
#tls_version : String
Returns the name of the TLS protocol version used by this socket.
-
#unbuffered_close
ameba:disable Metrics/CyclomaticComplexity
-
#unbuffered_flush
Flushes the wrapped
IO
. -
#unbuffered_read(slice : Bytes)
Reads at most slice.size bytes from the wrapped
IO
into slice. -
#unbuffered_rewind
Rewinds the wrapped
IO
. -
#unbuffered_write(slice : Bytes)
Writes at most slice.size bytes from slice into the wrapped
IO
. - #write_timeout
- #write_timeout=(value)
Instance Method Detail
Returns the negotiated ALPN protocol (eg: "h2"
) of nil
if no protocol was
negotiated.
Returns true
if this IO
is closed.
IO
defines returns false
, but including types may override.
If #sync_close?
is true
, closing this socket will
close the underlying IO.
Reads at most slice.size bytes from the wrapped IO
into slice.
Returns the number of bytes read.
Writes at most slice.size bytes from slice into the wrapped IO
.
Returns the number of bytes written.