I'm having difficulty with the delay when starting async asio udp socket. I do not have the same problems with an identical application using synchronous udp. I am communicating with a physical device that allows a maximum latency of 5 ms for each UDP packet, and currently I am getting 8 ms latency with std dev of 0.065 ms, which is surprisingly accurate.
I am on Mac OS X 10.10.4 with Xcode 6.3.2 (6D2105).
Here are some key information about this issue:
Sync UDP Test Program
- working, remaining under 5 ms latency 100% of the time for an hour
- Code
- Key Rows
Async UDP Testing Program
- high latency error, 8 ms with 0.065 ms std dev
- Code
- Key Rows
Does anyone know why this lag issue can occur in Async UDP version? Thanks.
source share