From fb3230f7f01389c01807105a03c7a11b3eb9e793 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Sat, 25 Dec 2021 03:26:18 +0900 Subject: Sync with v3.0.0 --- OpenSSL/Buffering.html | 64 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 20 deletions(-) (limited to 'OpenSSL/Buffering.html') diff --git a/OpenSSL/Buffering.html b/OpenSSL/Buffering.html index abaa0cfa..8aa3de5d 100644 --- a/OpenSSL/Buffering.html +++ b/OpenSSL/Buffering.html @@ -83,6 +83,7 @@
  • #eof
  • #eof?
  • #flush +
  • #getbyte
  • #getc
  • #gets
  • #print @@ -202,7 +203,7 @@

    Writes s to the stream. s will be converted to a String using .to_s method.

    -
    # File lib/openssl/buffering.rb, line 413
    +            
    # File lib/openssl/buffering.rb, line 422
     def <<(s)
       do_write(s)
       self
    @@ -224,7 +225,7 @@
               

    Closes the SSLSocket and flushes any unwritten data.

    -
    # File lib/openssl/buffering.rb, line 474
    +            
    # File lib/openssl/buffering.rb, line 483
     def close
       flush rescue nil
       sysclose
    @@ -248,7 +249,7 @@
     

    See also gets

    -
    # File lib/openssl/buffering.rb, line 250
    +            
    # File lib/openssl/buffering.rb, line 259
     def each(eol=$/)
       while line = self.gets(eol)
         yield line
    @@ -274,7 +275,7 @@
               

    Calls the given block once for each byte in the stream.

    -
    # File lib/openssl/buffering.rb, line 291
    +            
    # File lib/openssl/buffering.rb, line 300
     def each_byte # :yields: byte
       while c = getc
         yield(c.ord)
    @@ -331,7 +332,7 @@
               

    Returns true if the stream is at file which means there is no more data to be read.

    -
    # File lib/openssl/buffering.rb, line 322
    +            
    # File lib/openssl/buffering.rb, line 331
     def eof?
       fill_rbuff if !@eof && @rbuffer.empty?
       @eof && @rbuffer.empty?
    @@ -356,7 +357,7 @@
               

    Flushes buffered data to the SSLSocket.

    -
    # File lib/openssl/buffering.rb, line 462
    +            
    # File lib/openssl/buffering.rb, line 471
     def flush
       osync = @sync
       @sync = true
    @@ -369,6 +370,29 @@
             
    +
    + +
    +
    + + getbyte → 81 + + click to toggle source +
    + +
    +

    Get the next 8bit byte from ‘ssl`. Returns `nil` on EOF

    + +
    +
    # File lib/openssl/buffering.rb, line 108
    +def getbyte
    +  byte = read(1)
    +  byte && byte.unpack1("C")
    +end
    +
    +
    + +
    @@ -382,7 +406,7 @@

    Reads one character from the stream. Returns nil if called at end of file.

    -
    # File lib/openssl/buffering.rb, line 284
    +            
    # File lib/openssl/buffering.rb, line 293
     def getc
       read(1)
     end
    @@ -409,7 +433,7 @@

    Unlike IO#gets the separator must be provided if a limit is provided.

    -
    # File lib/openssl/buffering.rb, line 226
    +            
    # File lib/openssl/buffering.rb, line 235
     def gets(eol=$/, limit=nil)
       idx = @rbuffer.index(eol)
       until @eof
    @@ -446,7 +470,7 @@
     

    See IO#print for full details.