Class: Protocol::WebSocket::ProtocolError
- Defined in:
- lib/protocol/websocket/error.rb
Overview
Raised by stream or connection handlers, results in GOAWAY frame which signals termination of the current connection. You cannot recover from this exception, or any exceptions subclassed from it.
Direct Known Subclasses
Constant Summary
Constants inherited from Error
Error::GOING_AWAY, Error::INVALID_DATA, Error::NO_ERROR, Error::PROTOCOL_ERROR
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(message, code = PROTOCOL_ERROR) ⇒ ProtocolError
constructor
A new instance of ProtocolError.
Constructor Details
#initialize(message, code = PROTOCOL_ERROR) ⇒ ProtocolError
Returns a new instance of ProtocolError.
31 32 33 34 35 |
# File 'lib/protocol/websocket/error.rb', line 31 def initialize(, code = PROTOCOL_ERROR) super() @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
37 38 39 |
# File 'lib/protocol/websocket/error.rb', line 37 def code @code end |