Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

OpenSSL::SSL::SSLSocket#connect

() -> self
ssl.connect(timeout: ssl.timeout) → self

Initiates an SSL/TLS handshake with a server.

If timeout is specified, and if the handshake does not complete within timeout seconds, IO::TimeoutError is raised.