I am currently sending UDP packets to a remote server using javascript's setInterval() function to loop through the process every 100ms.
My issue is that this seems somewhat unreliable since it is running on the same thread as the UI. Is there a more reliable way I should be doing this?
var myVar = setInterval(function() {
sendUDP(msg);
}, 100);
From my current tests this method doesn't seem to be consistent. For example, an Android device was sending around 450-messages a minute, and an iPhone was sending around 380-messages a minute. Neither one is getting even close to the expected 600-message per minute.
Any guidance would be appreciated.