【发布时间】:2017-09-27 09:57:31
【问题描述】:
我正在我的应用程序中尝试这个 Socket.IO https://github.com/nkzawa/socket.io-android-chat
我正在用
连接套接字mSocket = IO.socket(ip:XXXX);
它正在抛出 EVENT_CONNECT_ERROR 监听器,我连接我的应用程序
使用我的计算机作为本地服务器。
这是我的节点 js 代码:
var http = require('http');
var server = http.createServer(function (req,res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World');
});
server.on('listening',function(){
console.log('ok, server is running');
});
server.listen(3000);
console.log('yes connected');
【问题讨论】: