I have multiple threads. Each thread receives data and sends to client an acknowledge packet. Each thread takes aprox. 531ms from start to finish. While capturing packets with wireshark.
I was expecting to see a lesser than 1 sec interval between receiving packet and sending packet. The problem is that I see packets from other communications between other devices that are communicating with the same socket but with a different virtual socket number.
Because of this in-between communications the interval between receive and sending packet is aprox 15 seconds.
[16:44:18]No.1073 - when device connects to server on port 7300 and sends data
[16:44:27]No.7535 - when acknowledge is sent to device
elapsed time = 9 seconds.
In those 9 seconds I see in wireshark other communications with other devices. I have timed the thread code that reads and sends ack and it takes less that one second.
Why does it take 9 seconds and not only the time of thread code(milliseconds)? The other threads have impact in this time?