随笔分类 -  Socket

摘要:socket.emit('action');表示发送了一个action命令,命令是字符串的,在另一端接收时,可以这么写: socket.on('action',function(){...});socket.emit('action',data);表示发送了一个action命令,还有data数据,在... 阅读全文
posted @ 2014-10-18 16:05 Liu66~ 阅读(17394) 评论(0) 推荐(3) 编辑
摘要:events.js:72 throw er; // Unhandled 'error' event ^Error: listen EADDRINUSE at errnoException (net.js:904:11) at Server._lis... 阅读全文
posted @ 2014-10-17 09:28 Liu66~ 阅读(24173) 评论(2) 推荐(5) 编辑
摘要: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... 阅读全文
posted @ 2014-10-14 15:46 Liu66~ 阅读(306) 评论(0) 推荐(0) 编辑
摘要:// send to current request socket clientsocket.emit('message', "this is a test");// sending to all clients, include senderio.sockets.emit('message', "... 阅读全文
posted @ 2014-10-14 14:14 Liu66~ 阅读(3718) 评论(0) 推荐(0) 编辑