Registry / messaging / eiows

eiows

JSON →
library9.2.0jsnpmunverified

eiows is a high-performance WebSocket engine for Node.js, designed as a drop-in replacement for the ws module in Socket.IO applications. Version 9.2.0 provides significant performance and memory-usage improvements but is only compatible with Node.js (v16 to <27) and runs exclusively on Linux, FreeBSD, and macOS. It requires engine.io 3.4.2 or higher and the system must have Git installed for native compilation. Compared to ws, eiows offers better scalability for WebSocket-heavy applications while maintaining API compatibility.

messaging
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default import works in ESM; CommonJS requires require('eiows') but it's the default export.

import eiows from 'eiows'

Named export 'Server' is available in both ESM and CJS.

import { Server } from 'eiows'

When using default import, eiows.Server is the class. Alternatively import { Server } directly.

new Server({ port: 8080 })

Create a Socket.IO server with eiows as the WebSocket engine, listening on port 3000.

import * as http from 'http'; import { Server } from "socket.io"; import eiows from 'eiows'; let server = http.createServer(); let io = new Server(server, { wsEngine: eiows.Server, perMessageDeflate: { threshold: 32768 } }); io.on("connection", (socket) => { console.log('Client connected'); }); server.listen(3000);
Debug
Known footguns
gotchaeiows only works on Linux, FreeBSD, and macOS. Windows is not supported.
gotchaGit must be installed on the system to build and compile the native module.
breakingEngines requirement: Node.js >=16 and <27.0. Older Node versions are not supported.
gotchaperMessageDeflate threshold is required (recommended 32768) to avoid memory issues.
gotchaUsing eiows.Server directly without Socket.IO is not documented; expected usage is via wsEngine option.
deprecatedCommonJS require('eiows') may not work if the package is used in a pure ESM environment.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources
packageeiows