Module: Protocol::WebSocket

Defined in:
lib/protocol/websocket/error.rb,
lib/protocol/websocket/frame.rb,
lib/protocol/websocket/digest.rb,
lib/protocol/websocket/framer.rb,
lib/protocol/websocket/version.rb,
lib/protocol/websocket/connection.rb,
lib/protocol/websocket/ping_frame.rb,
lib/protocol/websocket/pong_frame.rb,
lib/protocol/websocket/text_frame.rb,
lib/protocol/websocket/close_frame.rb,
lib/protocol/websocket/binary_frame.rb,
lib/protocol/websocket/continuation_frame.rb

Defined Under Namespace

Classes: BinaryFrame, CloseFrame, ClosedError, Connection, ContinuationFrame, Error, Frame, FrameSizeError, Framer, PingFrame, PongFrame, ProtocolError, TextFrame

Constant Summary collapse

GUID =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
FRAMES =

HTTP/2 frame type mapping as defined by the spec

{
	0x0 => ContinuationFrame,
	0x1 => TextFrame,
	0x2 => BinaryFrame,
	0x8 => CloseFrame,
	0x9 => PingFrame,
	0xA => PongFrame,
}.freeze
MAXIMUM_ALLOWED_FRAME_SIZE =
2**63
VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.accept_digest(key) ⇒ Object



27
28
29
# File 'lib/protocol/websocket/digest.rb', line 27

def self.accept_digest(key)
	Digest::SHA1.base64digest(key + GUID)
end