How to connect to a room with a Socket.IO client on Android? -


i using android-websockets library connect our socket.io server. connection created, can't connect room.

in javascript, our code looks this:

emit('subscribe', { 'channel' : 'test' }); 

i've tried using client.of("test", callback), client.emit("subscribe", jsonarray) array has channel, end creating frame error.

socket.io servers require authentication. done sending post /socket.io/1/ @ server , reading response this:

srglg8x2yschjzugveeq:60:60:websocket,htmlfile,xhr-polling,jsonp-polling 

the string before first ":" key. if connecting server via websocket address be:

ws://(your socket.io server)/socket.io/1/websocket/(the key) 

more information on socket.io protocol: github.com/learnboost/socket.io-spec

ps. don't know android programming i'm explaining socket.io protocol


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -