
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
udp-node-fisher
Advanced tools
主要针对lei-udp这个库重新用ts重写了一遍,优化了结构,修复了原有分包确认包action错误以及模拟丢包中重试部分没有模拟的问题。 这个库主要是对udp协议的封装,增加了udp自动分包,ping,可靠udp传输的功能。 ps:由于传输数据是协议格式,必须前后端都用这个库才可以。
npm i udp-node-fisher --save
import { UDP } from "udp-node-fisher";
var udp_client = new UDP({});
udp_client.on('close', function () {
console.log('udp client closed.')
})
//错误处理
udp_client.on('error', function () {
console.log('some error on udp client.')
})
// 接收消息
udp_client.on('data', (rinfo,msg) => {
// console.log(`receive message from ${rinfo.address}:${rinfo.port}:${msg}`);
let param = JSON.parse(msg.toString());
return param;
})
this._udp.send('127.0.0.1', 4000, {}, () => {
//发送成功回调
});
this._udp.sendR('127.0.0.1', 4000, {}, () => {
//服务器响应收到回调
});
//创建 udp server
this._server = new UDP({ port: port });
// 监听端口
this._server.on('listening', ()=>{
});
//接收消息
this._server.on('data', (linker,msg:Buffer)=>{
let strmsg = msg.toString();
let request: any;
try {
request = JSON.parse(strmsg);
} catch (e) {
console.error(`接收到错误数据${strmsg}-----来源${linkInfo.address}:${linkInfo.port}`);
return;
}
console.log(`收到[${linkInfo.address}:${linkInfo.port}]:${strmsg}`);
});
//错误处理
this._server.on('error', (err)=>{
});
FAQs
可靠UDP
The npm package udp-node-fisher receives a total of 0 weekly downloads. As such, udp-node-fisher popularity was classified as not popular.
We found that udp-node-fisher demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.