Class: Evma::Protocol
- Inherits:
-
Object
- Object
- Evma::Protocol
- Defined in:
- lib/evma/protocol.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
- #close ⇒ Object
- #close_after_writing ⇒ Object
-
#initialize(sig) ⇒ Protocol
constructor
A new instance of Protocol.
- #unbind ⇒ Object
Constructor Details
#initialize(sig) ⇒ Protocol
Returns a new instance of Protocol.
31 32 33 |
# File 'lib/evma/protocol.rb', line 31 def initialize sig @signature = sig end |
Instance Attribute Details
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
29 30 31 |
# File 'lib/evma/protocol.rb', line 29 def signature @signature end |
Instance Method Details
#close ⇒ Object
38 39 40 41 |
# File 'lib/evma/protocol.rb', line 38 def close Evma::Reactor.instance # ensure initialized EventMachine.close_connection signature, false end |
#close_after_writing ⇒ Object
43 44 45 46 |
# File 'lib/evma/protocol.rb', line 43 def close_after_writing Evma::Reactor.instance # ensure initialized EventMachine.close_connection signature, true end |
#unbind ⇒ Object
35 36 |
# File 'lib/evma/protocol.rb', line 35 def unbind end |