WebSockex.Frame (WebSockex v0.4.3) View Source
Functions for parsing and encoding frames.
Link to this section Summary
Functions
Encodes a frame into a binary for sending.
Parses and combines two frames in a fragmented segment.
Parses a bitstring and returns a frame.
Link to this section Types
Link to this section Functions
Specs
encode_frame(frame()) :: {:ok, binary()} | {:error, %WebSockex.FrameEncodeError{ __exception__: term(), close_code: term(), frame_payload: term(), frame_type: term(), reason: term() }}
Encodes a frame into a binary for sending.
Specs
parse_fragment( {:fragment, :text | :binary, binary()}, {:continuation | :finish, binary()} ) :: {:fragment, :text | :binary, binary()} | {:text | :binary, binary()} | {:error, %WebSockex.FragmentParseError{ __exception__: term(), continuation: term(), fragment: term(), reason: term() }}
Parses and combines two frames in a fragmented segment.
Specs
parse_frame(bitstring()) :: :incomplete | {:ok, frame(), buffer()} | {:error, %WebSockex.FrameError{ __exception__: term(), buffer: term(), opcode: term(), reason: term() }}
Parses a bitstring and returns a frame.