How do I check for pending UDP input?
Colin Brown
cbrown at metservice.com
Thu Mar 13 15:12:18 EST 2003
Hi, I am developing a multi-process application for theatrical lighting
using Python and communicate between processes via UDP.
I need to keep some of the connections asynchronous and need to
be able to either get the last packet sent or return an empty string.
My current code uses select with a small timeout to read in outstanding
packets until a timeout occurs returning the previous packet read if any.
This is not elegant. Does anyone have experience with using SIOCINQ
and IOCTLS in Python to find if a datagram is pending?
Thanks
Colin Brown
PyNZ
More information about the Python-list
mailing list