-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Description
我代码是这样的:
const Koa = require('koa');
const app = new Koa();
const server = require('http').Server(app.callback());
const io = require('socket.io')(server);
io.on('connection', function(socket){
io.emit('this', { will: 'be received by everyone'});
socket.on('private message', function (from, msg) {
console.log('I received a private message by ', from, ' saying:', msg);
});
socket.on('disconnect', function () {
io.emit('user disconnected');
});
});
但是前端请求的时候找不到数据,该如何做呢,希望提供ko2的一些源码。
Metadata
Metadata
Assignees
Labels
No labels