063 Socket IO

14 Dec 2014

Socket IO is a framework based on Web Sockets that enables real-time communication with duplex connection over TCP. In this episode, we will play with the technology Web Socket and learn how to emit and receive events from a server or client. Finally, we will explore Socket IO as a framework to detect emit, send, disconnect and broadcast events to multiple clients and server.

socket.on(‘disconnect’, function () {
console.log(‘1 client disconnected’);
});
});
```
- restart server with node server.js
- open client.html a few times and close them one by one - watch the server console