Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

OpenSSL::SSL::SSLSocket#sysread_nonblock

(*untyped) -> untyped
ssl.sysread_nonblock(length) => string
ssl.sysread_nonblock(length, buffer) => buffer
ssl.sysread_nonblock(length[, buffer [, opts]) => buffer

A non-blocking version of sysread. Raises an SSLError if reading would block. If “exception: false” is passed, this method returns a symbol of :wait_readable, :wait_writable, or nil, rather than raising an exception.

Reads length bytes from the SSL connection. If a pre-allocated buffer is provided the data will be written into it.

See also #sysread #syswrite #sysclose #syswrite_nonblock also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0