var http = require('http');
var express = require('express');
var app = express();
var server = http.createServer(app);
server.listen(3000);
var io = require('socket.io').listen(server);
io.set('log level', 1);
io.sockets.on('connection', function(socket) {
console.log('connected');
});
运行后
node server.js
有时“已连接”会记录到控制台而没有实际连接,它来自何处?