Make the queue size configurable. In my program, the server sometime starts on-demand, and the client buffers a significant number of packets by default, which causes a bit of flooding
Replaces a conditional with an assertion. I'd happily revert if this desired by maintainers. This code would probably be a bit more readable if dequeue_packet and requeue_packet were inlined into their callsite, which I'd also happily contribute
Drop oldest packets first. I believe this is reasonable (think TCP retransmits), but I'd be happy to keep the current behaviour if wanted
Side-note: Is there a way to run only tests that don't required sudo?
This PR contains three commits:
dequeue_packet
andrequeue_packet
were inlined into their callsite, which I'd also happily contributeSide-note: Is there a way to run only tests that don't required sudo?