abstract class OpenSSL::SSL::Socket
inherits IO
¶
Included modules
IO::Buffered
Direct known subclasses
OpenSSL::SSL::Socket::Client
OpenSSL::SSL::Socket::Server
Methods¶
#alpn_protocol
¶
Returns the negotiated ALPN protocol (eg: "h2"
) of nil
if no protocol was
negotiated.
#closed? : Bool
¶
View source
: Bool
#hostname : String?
¶
: String?
Returns the hostname provided through Server Name Indication (SNI)
#sync_close=(sync_close : Bool)
¶
(sync_close : Bool)
If #sync_close?
is true
, closing this socket will
close the underlying IO.
#sync_close? : Bool
¶
: Bool
If #sync_close?
is true
, closing this socket will
close the underlying IO.
#tls_version : String
¶
: String
Returns the name of the TLS protocol version used by this socket.
#unbuffered_read(slice : Bytes)
¶
(slice : Bytes)
Reads at most slice.size bytes from the wrapped IO
into slice.
Returns the number of bytes read.
#unbuffered_write(slice : Bytes)
¶
(slice : Bytes)
Writes at most slice.size bytes from slice into the wrapped IO
.
Returns the number of bytes written.