I having trouble getting socket io to send a response on connect for the android browser. I logged the parameters and they are appearing server side, it just seems like that the client side doesn't properly connnect. I disabled jsonp, but I heard that android falls back to xhr anyways.
socket.on('connect',function (data) {
socket.emit('setNickAndRoom', {nick: nick}, function(response){
//response. nothing :(.
});
});
client.on("setNickAndRoom", function(nick, fn,_){
//etc etc
fn({msg :nick});
});
This works on every browser (even mobile safari, mobile FF, mobile chrome beta). I have to refresh android browser 4-5 times for it to finally connect. BTW, im using streamline js (_)
UPDATE This seems to happen on wifi only
Limited options at this time:
http://code.google.com/p/weberknecht/
https://github.com/TooTallNate/Java-WebSocket
https://github.com/Gottox/socket.io-java-client
sound right as far as WebSockets go. Socket.IO's specific wire protocol do not appear to have been implemented in Java yet, so you may have to deal with that yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With