Re:What feature would improve the web?
by franksalim on Friday October 21, 2011 @10:18AM
(#3139826)
What use cases for TCP do you envision where WebSocket won't be sufficient? It is quite possible to speak standard protocols over WebSocket that are typically spoken over TCP.
[ Parent
| on HN ]
Re:What feature would improve the web?
by jorangreef on Friday October 21, 2011 @01:26PM
(#3140772)
TCP does not need the upgrade event, handshake etc. TCP is not limited by the WebSocket spec. TCP requires no additional server-side infrastructure.
Re:What feature would improve the web?
by franksalim on Friday October 21, 2011 @06:10PM
(#3141937)
Last thing first: TCP requires a listening server. WebSocket requires a listening server. There is not inherently more infrastructure required.
The handshake and HTTP upgrade are there for a reason. Connecting out from web applications with straight TCP breaks the web security model. After the handshake, you can treat WebSocket binary frames as if they were a TCP byte stream. Speak any protocol you want to.
Anything you can do with TCP you can do with WebSocket. The only exception is that you cannot connect to a listening server that does not expect the WebSocket handshake. That is intentional! In fact, that is the reason for the WebSocket handshake.