lib/sse_client/streaming_http.rb
# Attempt to read some more data from the socket. Return true if successful, false if EOF.
# A read timeout will result in an exception from Socketry's readpartial method.
Attempt to read some more data from the socket. Return true if successful, false if EOF.
A read timeout will result in an exception from Socketry's readpartial method.
Attempt to read some more data from the socket . Return true if successful false if EOF . A read timeout will result in an exception from Socketry ' s readpartial method .
def read_chunk_into_buffer
      @lock.synchronize { return false if @done }
      data = @socket.readpartial(DEFAULT_CHUNK_SIZE, timeout: @read_timeout)
      return false if data == :eof
      @parser << data
      true
    end
def read_chunk_into_buffer @lock . synchronize { return false if @done } data = @socket . readpartial ( DEFAULT_CHUNK_SIZE , timeout : @read_timeout ) return false if data == :eof @parser << data true end
Attempt to read some more data from the socket.
Attempt to read some more data from the socket .
# If @done is set, it means the Parser has signaled end of response body # We are piping the content through the parser so that it can handle things like chunked # encoding for us. The content ends up being appended to @buffer via our callback.