uce/site/doc/pages/ws_opcode.txt

22 lines
505 B
Plaintext

:sig
u8 ws_opcode()
:params
return value : opcode of the current WebSocket message
:see
>websocket
:content
Returns the opcode of the message currently being handled by `WS(Request& context)`.
Common values are:
- `0x1` for text messages
- `0x2` for binary messages
Related:
- PHP: WebSocket connection metadata and send APIs in Ratchet, Workerman, or similar server frameworks
- JavaScript / Node.js: browser `WebSocket` properties and Node `ws` server-side connection inspection and send methods