How it works | Socket.IO
The bidirectional channel between the Socket.IO server (Node.js) and the Socket.IO client (browser, Node.js, or another programming language) is established with a WebSocket connection whenever possible, and will use HTTP long-polling as fallback. The Socket.IO codebase is split into two distinct layers: Engine.IO is responsible for establishing the low-level connection between the server and the client. It handles: A detailed version of the Engine.IO protocol can be found here. The source code of the reference implementation (written in TypeScript) can be found here: There are currently two implemented transports: The HTTP long-polling transport (also simply referred as "polling") consists of successive HTTP requests: Due to the nature of the transport, successive emits may be concatenated and sent within the same HTTP request. The WebSocket transport consists, well, of a WebSocket connection, which provides a bidirectional and low-latency communication channel between the server and
Version: 4.x On this page The bidirectional connection between the Socket.IO server and the Socket.IO client is established with either: a WebTransport bidirectional stream a WebSocket connection or HTTP long-polling, in the worst case The Socket.IO codebase is split into two distinct layers: the low-level plumbing: what we call Engine.IO, the engine inside Socket.IO the high-level API: Socket.IO itself Engine.IO Engine.IO is responsible for establishing the low-level connection between the server and the client. It handles: the various transports and the upgrade mechanism the disconnection
related reading
- Socket.IO vs. WebSocket: Key differences and which to useably.com
- Mediumcodeburst.io
- the-websocket-handbook.pdfpages.ably.com
- How's Linear so fast? A technical breakdownperformance.dev
- How NAT traversal workstailscale.com
- What Server-Sent Events is - and how and when to implement it | Ably Realtimeably.com
- Node.js Fundamentals: Web Server Without Dependenciesblog.bloomca.me
- Realtime with serverless using Websocket in AWSunimedia.tech
- How does the Internet Work? - cs.fyics.fyi
- Serverless Framework - AWS Lambda Events - Websocket | Serverless Frameworkserverless.com
- Serverless Framework - AWS Lambda Events - Websocket | Serverless Frameworkserverless.com
- How TCP worksthevalleyofcode.com