Class: EventMachine::AblyHttpRequest::IOStreamer
- Inherits:
-
Object
- Object
- EventMachine::AblyHttpRequest::IOStreamer
- Includes:
- Deferrable
- Defined in:
- lib/em/io_streamer.rb
Constant Summary collapse
- CHUNK_SIZE =
16384
Instance Method Summary collapse
-
#initialize(connection, io, opts = {}) ⇒ IOStreamer
constructor
A new instance of IOStreamer.
Constructor Details
#initialize(connection, io, opts = {}) ⇒ IOStreamer
Returns a new instance of IOStreamer.
15 16 17 18 19 20 21 22 23 |
# File 'lib/em/io_streamer.rb', line 15 def initialize(connection, io, opts = {}) @connection = connection @io = io @http_chunks = opts[:http_chunks] @buff = String.new @io.binmode if @io.respond_to?(:binmode) stream_one_chunk end |