|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Efficient non-blocking UDP serverby calin (Deacon) |
| on Mar 20, 2004 at 16:47 UTC ( #338313=note: print w/ replies, xml ) | Need Help?? |
|
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).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||