$ npm install engine.io-client
Engine.IO is the low-level realtime engine behind Socket.IO.
It provides a reliable, bidirectional communication layer between a Node.js server and a client, using HTTP long-polling first and upgrading to better transports when possible, such as WebSocket or WebTransport.
Table of Contents
npm install engine.io-client
import { Socket } from "engine.io-client";
const socket = new Socket("ws://localhost:8080");
socket.on("open", () => {
socket.send("hello");
});
socket.on("message", (data) => {
console.log("received:", data);
});
See the API documentation for the full list of available options, methods, events, and properties.
© 2010 - cnpmjs.org x YWFE | Home | YWFE