in reply to Efficient non-blocking UDP server
Think your UDP-receiving code as an interrupt handler and try applying common sense from there. An interrupt handling routine should finish in short, quasi-constant time, and definitely its execution time should not depend on circumstances outside its control.
I suggest pushing your received packets onto a safe queue right away (without deciding upon their content), and let other thread/process handle them. (Thread::Queue looks interesting).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Efficient non-blocking UDP server
by liz (Monsignor) on Mar 20, 2004 at 21:25 UTC | |
by calin (Deacon) on Mar 21, 2004 at 19:19 UTC |