Class: Reel::ChunkStream
Instance Method Summary collapse
- #close ⇒ Object
-
#finish ⇒ Object
finish does not actually close the socket, it only inform the browser there are no more messages.
- #write(chunk) ⇒ Object (also: #<<)
Methods inherited from Stream
#call, #closed?, #each, #initialize
Constructor Details
This class inherits a constructor from Reel::Stream
Instance Method Details
#close ⇒ Object
79 80 81 82 |
# File 'lib/reel/stream.rb', line 79 def close finish super end |
#finish ⇒ Object
finish does not actually close the socket, it only inform the browser there are no more messages
75 76 77 |
# File 'lib/reel/stream.rb', line 75 def finish write "" end |
#write(chunk) ⇒ Object Also known as: <<
65 66 67 68 69 70 |
# File 'lib/reel/stream.rb', line 65 def write(chunk) chunk_header = chunk.bytesize.to_s(16) super chunk_header + Response::Writer::CRLF super chunk + Response::Writer::CRLF self end |