The client API in one block
The browser/Node client (socket.io-client) is a single io() call. It returns a socket that auto-reconnects, supports event subscriptions and emits, and provides callback-based or promise-based acknowledgements. The same SDK works in Node, React Native, and any modern bundler.
Event names are arbitrary strings
Unlike raw WebSocket, you do not roll your own message router. You just socket.on('chat:message', handler) and socket.emit('chat:message', payload). The library maps event names to internal frame types.
Acknowledgements: callback or Promise
Pass a callback as the last argument to emit and the library waits for the server to ack. Use emitWithAck for a Promise-based API. Server-side, your event handler returns a value or array which becomes the ack data. This gives you request-response with no correlation-ID code to write.