I am creating a VoIP application. The VoIP application needs to send and receive RTP packets at 20 ms intervals.
The application calls sendto() of the Socket API at 20 ms intervals, but the iPhone buffers the send data inside iOS and then sends RTP packets in batches at 1 second intervals. (I captured the sned packets of iPhone with rvctl and confirmed this. please reffer "Sending at 1 second intervals.png" for detail)
Similarly, other devices send RTP packets to the iPhone at 20 millisecond intervals, but the iPhone only receives them at 1 second intervals. (please reffer "Receiving at 1 second intervals.png" for detail)
Why is this?
If the cause of the delay is in the Wi-Fi protocol and the cause can be found from sysdiagnose, please tell me the search key for sysdiagnose that shows the cause of the delay and the meaning of the corresponding log.
I uploaded sysdiagnose and result of lan capture to below.
[sysdiagnose and lan capture]
https://drive.google.com/file/d/149OPmePAF4hnZj6NeSnKc5NizfitPQDS/view?usp=sharing
And, the start and end times, packet number in the lan capture of the call shown in the png example are below
Start time; 13:57:22.349608/packet number; 948
End time; 13:57:37.482874/packet number; 2583