End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::SSL::SSLSocket#connect_nonblock
ssl.connect_nonblock([options]) => self
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_ssl_connect_nonblock(int argc, VALUE *argv, VALUE self)
{
VALUE opts;
rb_scan_args(argc, argv, "0:", &opts);
ossl_ssl_setup(self);
return ossl_start_ssl(self, SSL_connect, "SSL_connect", opts);
}
Initiates the SSL/TLS handshake as a client in non-blocking manner.
Example
# emulates blocking connect begin ssl.connect_nonblock rescue IO::WaitReadable IO.select([s2]) retry rescue IO::WaitWritable IO.select(nil, [s2]) retry end
By specifying a keyword argument exception to false, you can indicate that connect_nonblock should not raise an IO::WaitReadable or IO::WaitWritable exception, but return the symbol :wait_readable or :wait_writable instead.
See also
#connect
#export_keying_material
#client_cert_cb
#finished_message
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0