modulepackage
0.0.1
Repository: https://github.com/intuitivelabs/websocket.git
Documentation: pkg.go.dev
# README
WebSocket
WebSocket protocol decoder. IETF specs:
# Functions
NewMessage returns a pointer to a newly initialized, empty message which has at most 'maxFrames' frames and a payload of at most 'maxPayloadSize' bytes.
# Constants
opcodes.
opcodes.
opcodes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Fin, Reserved flags & opcode bitmask.
Mask flag & payload bitmask.
length is encoded on 64 bits; maximum frame length is 16EiB (exbibyte).
length is encoded on 16 bits; maximum frame length is 64 KB.
bytes.
Fin, Reserved flags & opcode bitmask.
Mask flag & payload bitmask.
opcodes.
opcodes.
Fin, Reserved flags & opcode bitmask.
Fin, Reserved flags & opcode bitmask.
Fin, Reserved flags & opcode bitmask.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
opcodes.
# Structs
WebSocket frame
see https://www.rfc-editor.org/rfc/rfc6455.html#section-5.2
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-------+-+-------------+-------------------------------+
|F|R|R|R| opcode|M| Payload len | Extended payload length |
|I|S|S|S| (4) |A| (7) | (16/64) |
|N|V|V|V| |S| | (if payload len==126/127) |
| |1|2|3| |K| | |
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
| Extended payload length continued, if payload len == 127 |
+ - - - - - - - - - - - - - - - +-------------------------------+
| |Masking-key, if MASK set to 1 |
+-------------------------------+-------------------------------+
| Masking-key (continued) | Payload Data |
+-------------------------------- - - - - - - - - - - - - - - - +
: Payload Data continued ..
Header of an WebSocket frame
see https://www.rfc-editor.org/rfc/rfc6455.html#section-5.2
*/.
A websockets message can be sent using a number of frames (by fragmenting it).
# Type aliases
No description provided by the author