Friday 2 June 2017

socket.emit doesn't get data to front side

I have an app using socket.io to communicate between server side and front side, sometimes the socket.emit in the server side doesn't transfer the data to the front even though the data exists and I get a timeout error in the listenResponse in the front side. This happens in a random way, my code is very basic, from server side :

return socket.emit(rep, {
                                        rep : response,
                                        name: response.name
                                    }
                                );

I checked with a console.log in the server side that response is not empty. Could you please help me fix this to make sure that data is transfered to the front side ? Thank you



via Jean

No comments:

Post a Comment