Gottox / socket.io-java-client

Socket.IO Client Implementation in Java
MIT License
950 stars 387 forks source link

Client can't receive message emitted from server in XHR Polling mode #88

Open kscc25 opened 10 years ago

kscc25 commented 10 years ago

I wanna deploy my server to Heroku, currently Heroku only supports XHR Polling so I have to configure my server use XHR Polling instead of Websocket.

I've tested in local, my server runs well with Websocket but not with XHR Polling:

io.sockets.on('connection', function (socket) {
    socket.emit('connected', socket.id); // <-- this works
    socket.on('join', function (nickname) { // <-- this also works
        console.log(nickname, 'request joined');
        socket.emit('join', true); // <-- this doesn't work, 
                                   //client doesn't receive message
    });

Maybe it's some problems with XHR Transport

xiaofeilee commented 10 years ago

I have also seen the same problem, but have not found the answer, if you solve the problem, please share it