I\'ve read about WebSockets and I wonder why browser couldn\'t simply open trivial TCP connection and communicate with server like any other desktop application. And why thi
Websocket is a application layer protocol while TCP is transport layer protocol. At transport layer, we usually have TCP and UDP protocol. Any message from application layer need to go through transport layer to be transmitted to other machine. Hence, websocket and tcp have a relationship to each other and can not be comparable.