1 of 1 people found this helpful
I figured it out. The problem is actually the opposite. lwIP does not stack packets when calling lwip_recvfrom. We have a periodic packet, and a non periodic packet. The receive expects a response from the periodic packet, but everytime we send the non period packet, the response caused by that packet adds one more packet to read onto the receive buffer. Since lwip does not stack packets, we need to do extra reads to catch up, essentially always reading as many packets as available, otherwise we will be backing up by one packet everytime we send a non periodic packet, which pushes out our perceived received time by one more read window each time.