2 ms·
> WebSocket can run on top of HTTP/2 Isn't "websocket" just a standard tcp socket, whose specification to instantiate it was born in a comparatively ephemeral
by jjtheblunt 4y ago
> WebSocket can run on top of HTTP/2
Isn't "websocket" just a standard tcp socket, whose specification to instantiate it was born in a comparatively ephemeral HTTP (of whatever version) request, and which outlives the request, so isn't on top of anything other than tcp?
- wmf 4y agoNo, despite the name WebSockets are not plain TCP.
- jjtheblunt 4y agoThey're an http protocol for setting one up, you mean? First sentence at this article: https://en.wikipedia.org/wiki/WebSocket https://en.wikipedia.org/wiki/WebSocket
- jhugo 4y agoNo, they're more than that. After you upgrade to WebSocket you still have to speak the WebSocket protocol over TCP. It includes message framing — with different defined message types, masking, ping/pong, an extension system (including for example optional per-message compression), ...
- deleted 4y ago[deleted]
- aaaaaaaaaaab 4y agoTCP is a stream of bytes. WebSockets are message-based.