Starship.Reactor.Websocket.Frame (Starship v0.0.1) View Source
A websocket frame helper, used to parse and generate websocket frames.
Link to this section Summary
Types
A properly parsed websocket frame
A websocket opcode
Errors that occur when parsing a websocket frame
Functions
Parses a websocket frame into a readable payload (bitstring, binary, or nil values).
Link to this section Types
Specs
frame() :: {:ok, fin_bit(), mask_bit(), opcode(), payload()}
A properly parsed websocket frame
Specs
opcode() :: :continuation | :text | :binary | :close | :ping | :pong
A websocket opcode
Specs
parse_error() :: {:error, reason()}
Errors that occur when parsing a websocket frame
Link to this section Functions
Specs
Specs
parse_frame(binary(), opcode()) :: frame() | parse_error()
Parses a websocket frame into a readable payload (bitstring, binary, or nil values).