You can, of course, use HTTP for this, but for real-time exchange, the best option is to use websockets.
Raw sockets (aka TCP sockets) are not part of the W3C standard . Despite the fact that some browsers implement them , I would recommend not using them if you do not care about blocking your application in this particular browser.
, Websockets , , , JS.
, ++- , , , this , .
, /, Node.js Socket.io , . , Socket.io protocol, ++, .
Raw (TCP)
WebSockets
TCP .
: -, TCP- W3C, API- ( ), - ( Chrome ).