3 ms·
> Sadly, we're moving away from text protocols. SPDY and WebSockets are binary. Nothing prevents your WS payload from being textual, as far as I know.
by masklinn 15y ago
> Sadly, we're moving away from text protocols. SPDY and WebSockets are binary.
Nothing prevents your WS payload from being textual, as far as I know.
- pornel 15y agoYou can use textual payload, but the WS protocol itself (aside from pretend-HTTP handshake) is binary and your payload may be masked on the wire too. http://tools.ietf.org/html/rfc6455#section-5.2 http://tools.ietf.org/html/rfc6455#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 | +-------------------------------- - - - - - - - - - - - - - - - +