December 2019
Intermediate to advanced
314 pages
6h 51m
English
First off, let's briefly introduce new components for our application. WebSocket, as defined by its enterprise specification, is an API that establishes socket connections between a browser and a server endpoint. This is pretty much similar to standard TCP sockets due to its persistent connection between the client and the server, where both parties can start sending data at any time.
Typically, you would open a WebSocket connection simply by calling the WebSocket constructor in your JavaScript code:
var connection = new WebSocket('ws://localhost:8080/hello');
Read now
Unlock full access