pub enum OpCode {
Continue,
Text,
Binary,
ReservedNonControl,
Close,
Ping,
Pong,
ReservedControl,
}
Expand description
Defines the interpretation of the “Payload data”. If an unknown opcode is received, the receiving endpoint MUST Fail the WebSocket Connection. The following values are defined.
- x0 denotes a continuation frame
- x1 denotes a text frame
- x2 denotes a binary frame
- x3-7 are reserved for further non-control frames
- x8 denotes a connection close
- x9 denotes a ping
- xA denotes a pong
- xB-F are reserved for further control frames
Variants§
Continue
- x0 denotes a continuation frame
Text
- x1 denotes a text frame
Binary
- x2 denotes a binary frame
ReservedNonControl
- x3-7 are reserved for further non-control frames
Close
- x8 denotes a connection close
Ping
- x9 denotes a ping
Pong
- xA denotes a pong
ReservedControl
- xB-F are reserved for further control frames