Class: Evma::StreamProtocol

Inherits:
Protocol show all
Defined in:
lib/evma/protocol.rb

Instance Attribute Summary

Attributes inherited from Protocol

#signature

Instance Method Summary collapse

Methods inherited from Protocol

#close, #close_after_writing, #unbind

Constructor Details

#initialize(sig) ⇒ StreamProtocol

Returns a new instance of StreamProtocol.



57
58
59
# File 'lib/evma/protocol.rb', line 57

def initialize sig
  super
end

Instance Method Details

#send_data(data) ⇒ Object



61
62
63
64
# File 'lib/evma/protocol.rb', line 61

def send_data data
  Evma::Reactor.instance # ensure initialized
  EventMachine.send_data signature, data, data.length
end