Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::SSL::SSLSocket#session
() -> ::OpenSSL::SSL::Session?
ssl.session → aSession
ext/openssl/lib/openssl/ssl.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/openssl/lib/openssl/ssl.rb, line 573
def session
SSL::Session.new(self)
rescue SSL::Session::SessionError
nil
end
Returns the SSLSession object currently used, or nil if the session is not established.
See also
#session=
#post_connection_check
#pending
#session_get_cb
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0