I have a problem with my sockets where my server side code is executed until mine is complete socket.emit. Here is a snippet:
admin.getTh(function(th){
socket.emit('GPS', {gpsResults: data, thresholds: th, PEMSID: PEMSID, count: count});
count++;
toolbox.drawPaths(function(ta){
console.log(ta);
});
});
So, I need the code that is executed on the client using socket.emit('GPS', ...)to complete completely before toolbox.drawPaths. I tried sending a request to emit, like you socket.on(..., function(){...}), but this does not seem to be part of the API. Any suggestions?
gjw80 source
share