Preview Ruby 4.1 is a preview. It can change before the final release. 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, exception: false) → buffer, nil, :wait_readable, or :wait_writable
ext/openssl/lib/openssl/ssl.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/openssl/lib/openssl/ssl.rb, line 516
def sysread_nonblock(length, buffer = nil, exception: true)
buffer ||= string_new_capacity(length)
ret = ssl_read(length, buffer)
if exception
raise EOFError, "end of file reached" if ret.nil?
check_nonblock(ret)
end
ret
end
A non-blocking version of sysread.