Class: MR::PipeTransport::PipeIn
- Inherits:
-
Coolio::IO
- Object
- Coolio::IO
- MR::PipeTransport::PipeIn
- Includes:
- MessageReceiver
- Defined in:
- lib/pmux/mros.rb
Instance Method Summary collapse
-
#initialize(ruby_io, server, pout) ⇒ PipeIn
constructor
A new instance of PipeIn.
- #on_close ⇒ Object
- #on_read(data) ⇒ Object
- #on_request(msgid, method, param) ⇒ Object
Constructor Details
#initialize(ruby_io, server, pout) ⇒ PipeIn
Returns a new instance of PipeIn.
189 190 191 192 193 194 195 |
# File 'lib/pmux/mros.rb', line 189 def initialize ruby_io, server, pout @ruby_io = ruby_io super ruby_io @server = server @pout = pout @pac = MessagePack::Unpacker.new end |
Instance Method Details
#on_close ⇒ Object
202 203 204 |
# File 'lib/pmux/mros.rb', line 202 def on_close on_request 0, 'quit', [] end |
#on_read(data) ⇒ Object
196 197 198 |
# File 'lib/pmux/mros.rb', line 196 def on_read data @pac.feed_each(data) {|obj| obj} end |
#on_request(msgid, method, param) ⇒ Object
199 200 201 |
# File 'lib/pmux/mros.rb', line 199 def on_request msgid, method, param @server.on_request @pout, msgid, method, param end |