class

OpenSSL::SSL::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.

Source
cipher

Returns the current cipher used by this socket.

Source
closed?

Returns true if this IO is closed.

IO defines returns false, but including types may override.

Source
finalize
Source
hostname

Returns the hostname provided through Server Name Indication (SNI)

Source
local_address
Source
peer_certificate

Returns the OpenSSL::X509::Certificate the peer presented, if a connection was established.

NOTE: Due to the protocol definition, a TLS/SSL server will always send a certificate, if present. A client will only send a certificate when explicitly requested to do so by the server (see SSL_CTX_set_verify(3)). If an anonymous cipher is used, no certificates are sent. That a certificate is returned does not indicate information about the verification state.

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

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

Source
sync_close?

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

Source
tls_version

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

Source
unbuffered_close

Closes the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_flush

Flushes the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_read(slice : Bytes) : Int32

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

TODO: Add return type restriction Int32

Source
unbuffered_rewind

Rewinds the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_write(slice : Bytes) : Nil

Writes slice entirely into the wrapped IO.

TODO: Add return type restriction Nil

Source
write_timeout
Source
write_timeout=(value)
Source

Nested types