Sending and receiving events
Socket.IO allows you to emit and receive custom events. Besides, connect, message and disconnect, you can emit custom events with your own event name.
Restricting yourself to a namespace
If you have control over all the messages and events emitted for a particular application, using the default/namespace works. If you want to leverage 3rd-party code or produce code to share with others, socket.io provides a way of namespacing a socket. This has the benefit of multiplexing a single connection. Instead of socket.io using two WebSocket connections, it’ll use one.