
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
node-kcp-x
Advanced tools
| English | 简体中文 |
KCP Protocol for Node.js
A fork of node-kcp, rewritten using node-addon-api
npm install node-kcp-x
npm install -g node-gyp prebuildify
git clone https://github.com/bruce48x/node-kcp
cd node-kcp
npm i
npm run build
npm run install
node test/udpserver.js
node test/udpclient.js
# Run server
node examples/server.js
# Run client
node examples/client.js
# Run stream server
node examples/stream-server.js
# Run stream client
node examples/stream-client.js
const kcp = require('node-kcp-x');
const Kcp = kcp.KCP;
// Create KCP instance
const kcpObj = new Kcp(conv, context);
// Set output callback
kcpObj.output((data, size, context) => {
// Send data to network
});
// Send data
kcpObj.send(buffer);
// Receive data
const buffer = kcpObj.recv();
// Update KCP state
kcpObj.update(timestamp);
// Check next update time
const nextUpdate = kcpObj.check(timestamp);
If you want to use node-kcp in pomelo server, you need pomelo-kcp
Apache-2.0
FAQs
KCP protocol for Node.js
The npm package node-kcp-x receives a total of 16 weekly downloads. As such, node-kcp-x popularity was classified as not popular.
We found that node-kcp-x demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.