Class: Tep::WebSocket::ParseResult
- Inherits:
-
Object
- Object
- Tep::WebSocket::ParseResult
- Defined in:
- lib/tep/websocket/frame.rb
Overview
ParseResult carries either a parsed frame, a “need more bytes” signal, or a close-code for a protocol violation. Field is named ‘outcome` (not `status`) because attr_accessor :status collides with Tep::Response.status (Integer) under spinel’s same-name-attr unification family (matz/spinel#537 / #538), widening Tep.reason(status) to accept poly and breaking the build.
Instance Attribute Summary collapse
-
#close_code ⇒ Object
Returns the value of attribute close_code.
-
#consumed ⇒ Object
Returns the value of attribute consumed.
-
#frame ⇒ Object
Returns the value of attribute frame.
-
#outcome ⇒ Object
Returns the value of attribute outcome.
Instance Method Summary collapse
-
#initialize ⇒ ParseResult
constructor
A new instance of ParseResult.
Constructor Details
#initialize ⇒ ParseResult
Returns a new instance of ParseResult.
230 231 232 233 234 235 |
# File 'lib/tep/websocket/frame.rb', line 230 def initialize @outcome = "" @frame = Tep::WebSocket::Frame.new(true, 0, "") @consumed = 0 @close_code = 0 end |
Instance Attribute Details
#close_code ⇒ Object
Returns the value of attribute close_code.
228 229 230 |
# File 'lib/tep/websocket/frame.rb', line 228 def close_code @close_code end |
#consumed ⇒ Object
Returns the value of attribute consumed.
228 229 230 |
# File 'lib/tep/websocket/frame.rb', line 228 def consumed @consumed end |
#frame ⇒ Object
Returns the value of attribute frame.
228 229 230 |
# File 'lib/tep/websocket/frame.rb', line 228 def frame @frame end |
#outcome ⇒ Object
Returns the value of attribute outcome.
228 229 230 |
# File 'lib/tep/websocket/frame.rb', line 228 def outcome @outcome end |