Here's a simple way to fix the congestion from the keep alive x10 packets.
This is a reference. Not to be the real solution
The proper way, should have a unified solution that also does not send a real rumble packet in less than 15ms. i do not know how you want to implement it.
In my opinion, it's better to make a threaded SendRumble() that always run on the background and remove it from the Poll() thread. And it should do the following:
When amp is 0.0f, sends every 120ms.
When amp is >0.0f, sends every 15ms.
When amp changes from >0.0f to 0.0f, send it in 15ms from the previous packet and then switch to 120ms wait time.
Lastly, it should use one Stopwatch() timer for this job.
Here's a simple way to fix the congestion from the keep alive x10 packets.
This is a reference. Not to be the real solution The proper way, should have a unified solution that also does not send a real rumble packet in less than 15ms. i do not know how you want to implement it.
In my opinion, it's better to make a threaded SendRumble() that always run on the background and remove it from the Poll() thread. And it should do the following: