Thursday 8 June 2017

How to pass parameter to socket io connect in Android?

I want to pass parameter to socket io connect in Android. I wan't to pass device id so I can see which devices are connected in the moment.

The code in js will look like:

var socket = io.connect('http://localhost:8890',{ query: "foo=bar" });

But how can I do it in Android?

I'm using libraries:

com.github.nkzawa.socketio.client.IO;
com.github.nkzawa.socketio.client.Socket;



via Daniel Więcek

No comments:

Post a Comment