Saturday, 29 April 2017

How to connect android application to local computer as a server

Iam Trying this Socket.IO in my Application https://github.com/nkzawa/socket.io-android-chat

Iam connecting the socket with

mSocket = IO.socket(ip:XXXX);

It is throwing to EVENT_CONNECT_ERROR listener,can i connect my applcation using my computer as a local server..

here is me node js code:

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');



via selva kumar

No comments:

Post a Comment