You seem to assume that WebSocket is a replacement for HTTP. It is not. It's an extension.

The main use-case of WebSockets is Javascript applications which run in the web browser and receive real-time data from a server. Games are a good example.

Before WebSockets, the only method for Javascript applications to interact with a server was through `XmlHttpRequest`. But these have a major disadvantage: The server can't send data unless the client has explicitly requested it.

But the new WebSocket feature allows the server to send data whenever it wants. This allows implementing browser-based games with much lower latency and without having to use ugly hacks like AJAX long-polling or browser plugins.

**So why not use normal HTTP with streamed requests and responses**

In a comment to another answer, you suggested to just stream the client request and response body asynchronously.

In fact, WebSockets are basically that. An attempt to open a WebSocket connection from the client looks like an HTTP request at first, but a special directive in the header (Upgrade: WebSocket) tells the server to start communicating in this asynchronous mode. [First drafts of the WebSocket protocol][1] weren't much more than that and some handshaking to ensure that the server actually understands that the client wants to communicate asynchronously. But then it was realized that proxy servers would be confused by that because they are used to the usual request/response model of HTTP. A [potential attack scenario][2] against proxy servers was discovered. To prevent this it was necessary to make WebSocket traffic look, unlike any normal HTTP traffic. That's why the masking keys were introduced in [the final version of the protocol][3].


 [1]: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00
 [2]: http://news.cnet.com/8301-30685_3-20025272-264.html
 [3]: http://tools.ietf.org/html/rfc6455