Exception: Lich::Common::WebSocket::Frame::ProtocolError
- Inherits:
-
StandardError
- Object
- StandardError
- Lich::Common::WebSocket::Frame::ProtocolError
- Defined in:
- documented/common/websocket/frame.rb
Overview
Raised for any structural framing violation: reserved bits set, an unsupported opcode, an oversized/fragmented control frame, a continuation frame with no message in progress, or -- per RFC 6455 5.1 -- a masked frame arriving from the server.
Instance Attribute Summary collapse
-
#decoded_messages ⇒ Array<Message>
Messages Reader#feed had already decoded from this same call's bytes before hitting the violation -- often the last data a caller will see before the connection is torn down, so worth handing back rather than discarding along with the raised error.
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ void
constructor
Initializes a ProtocolError with an optional message and an empty decoded_messages array.
Constructor Details
#initialize(message = nil) ⇒ void
Initializes a ProtocolError with an optional message and an empty decoded_messages array.
77 78 79 80 |
# File 'documented/common/websocket/frame.rb', line 77 def initialize( = nil) super @decoded_messages = [] end |
Instance Attribute Details
#decoded_messages ⇒ Array<Message>
Returns messages Reader#feed had already decoded from this same call's bytes before hitting the violation -- often the last data a caller will see before the connection is torn down, so worth handing back rather than discarding along with the raised error. Empty unless the Reader that raised this populated it.
71 72 73 |
# File 'documented/common/websocket/frame.rb', line 71 def @decoded_messages end |