摘要: 代码 //依赖库 const zlib = require('zlib') // client是websocket连接 client.onmessage = (e)=> { console.log(e.data) let data = Buffer.from(zlib.gunzipSync(e.da 阅读全文
posted @ 2021-05-19 15:33 HumorChen99 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 依赖 依赖包是websocket,yarn和npm自己选自己的 #npm npm install websocket #yarn yarn add websocket 由于我的项目是nestjs的,当然你的不是也能使用的。我会把我全部依赖挂在文章最后。 使用代码 export const W3CWe 阅读全文
posted @ 2021-05-19 10:23 HumorChen99 阅读(16) 评论(0) 推荐(0) 编辑