npm install ws
var WebSocketServer = require('ws').Server, wss = new WebSocketServer({ port: 8080 }); wss.on('connection', function (ws) { console.log('client connected'); ws.on('message', function (message) { console.log(message); }); });
在线咨询
微信咨询
电话咨询
028-86922220(工作日)
18980820575(7×24)
提交需求
返回顶部