module WebSocket
Nested Classes and Modules
class BinaryFrameRepresents a binary frame that is sent or received by a WebSocket connection.
class CloseFrameRepresents a close frame that is sent or received by a WebSocket connection.
class ConnectionWraps a framer and implements for implementing connection specific interactions like reading and writing text.
class ContinuationFrameRepresents a continuation frame that is sent or received by a WebSocket connection when a message is split into multiple frames.
class ErrorRepresents an error that occurred during the WebSocket protocol negotiation or communication. Status codes as defined by https://tools.ietf.org/html/rfc6455#section-7.4.1.
class ProtocolErrorRaised 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.
class ClosedErrorThe connection was closed, maybe unexpectedly.
class FrameSizeErrorWhen the frame payload does not match expectations.
module ExtensionsManages WebSocket extensions negotiated during the handshake.
class FrameRepresents a single WebSocket frame as defined by RFC 6455.
class FramerWraps an underlying
Async::IO::Streamfor reading and writing binary data into structured frames.class MessageRepresents a message that can be sent or received over a WebSocket connection.
class TextMessageRepresents a text message that can be sent or received over a WebSocket connection.
class BinaryMessageRepresents a binary message that can be sent or received over a WebSocket connection.
class PingMessageRepresents a ping message that can be sent over a WebSocket connection.
class PingFrameRepresents a ping frame that is sent or received by a WebSocket connection.
class PongFrameRepresents a pong frame that is sent or received by a WebSocket connection.
class TextFrameRepresents a text frame that is sent or received by a WebSocket connection.
Definitions
FRAMES
HTTP/2 frame type mapping as defined by the spec.
Implementation
FRAMES = {
0x0 => ContinuationFrame,
0x1 => TextFrame,
0x2 => BinaryFrame,
0x8 => CloseFrame,
0x9 => PingFrame,
0xA => PongFrame,
}.freeze
MAXIMUM_ALLOWED_FRAME_SIZE = 2**63
The maximum allowed frame size in bytes.