Reputation: 1218
I'm using the socket service in my application
mSocket = new SocketIO("ip:port"); //work smoothly
However we need to use the "hostname" instead of ip. When I refer to "hostname", it means the "hostname" command in windows. The image below is the command I'm using.
When I use the hostname instead of ip
this way
mSocket = new SocketIO("hostname:port"); //not work
android launches an android error -
io.socket.SocketIOException: Error while handshaking with hostname. Unable to resolve host "null": No address associated with hostname
Upvotes: 0
Views: 76