abstract class DTLS::Socket

Included Modules

Direct Known Subclasses

Defined in:

dtls/client.cr

Instance Method Summary

Instance Method Detail

def alpn_protocol #

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


[View source]
def cipher : String #

Returns the current cipher used by this socket.


[View source]
def closed? : Bool #
Description copied from class IO

Returns true if this IO is closed.

IO defines returns false, but including types may override.


[View source]
def finalize #

[View source]
def hostname : String | Nil #

Returns the hostname provided through Server Name Indication (SNI)


[View source]
def local_address #

[View source]
def read_timeout #

[View source]
def read_timeout=(value) #

[View source]
def remote_address #

[View source]
def sync_close=(sync_close : Bool) #

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


[View source]
def sync_close? : Bool #

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


[View source]
def tls_version : String #

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


[View source]
def unbuffered_close #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def unbuffered_flush #
Description copied from module IO::Buffered

Flushes the wrapped IO.


[View source]
def unbuffered_read(slice : Bytes) #
Description copied from module IO::Buffered

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


[View source]
def unbuffered_rewind #
Description copied from module IO::Buffered

Rewinds the wrapped IO.


[View source]
def unbuffered_write(slice : Bytes) #
Description copied from module IO::Buffered

Writes at most slice.size bytes from slice into the wrapped IO. Returns the number of bytes written.


[View source]
def write_timeout #

[View source]
def write_timeout=(value) #

[View source]