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
(::Integer length, ?::String buffer) -> ::String
ssl.sysread(length) → string
ssl.sysread(length, buffer) → buffer
ext/openssl/lib/openssl/ssl.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/openssl/lib/openssl/ssl.rb, line 503
def sysread(length, buffer = nil)
buffer ||= string_new_capacity(length)
blocking {
ssl_read(length, buffer) or raise EOFError, "end of file reached"
}
end
Reads length bytes from the SSL connection. If a pre-allocated buffer is provided the data will be written into it.
See also
#sysclose
#sysread_nonblock
#string_new_capacity
#syswrite
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0