随笔分类 - Socket
摘要:socket.emit('action');表示发送了一个action命令,命令是字符串的,在另一端接收时,可以这么写: socket.on('action',function(){...});socket.emit('action',data);表示发送了一个action命令,还有data数据,在...
阅读全文
摘要:events.js:72 throw er; // Unhandled 'error' event ^Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._lis...
阅读全文
摘要:Note that this is just for Socket.io version 0.7, and possibly higher if they don’t change the API again.I’m writing an iPhone app right now using Pho...
阅读全文
摘要:// send to current request socket clientsocket.emit('message', "this is a test");// sending to all clients, include senderio.sockets.emit('message', "...
阅读全文