Socket programming design problem
Dan Sommers
me at privacy.net
Thu Dec 22 19:44:02 EST 2005
On Thu, 22 Dec 2005 22:12:09 +0000,
David <null at example.net> wrote:
> a) Big problem, I can't see how to receive from more than one socket
> at once. I need to do this so that data from the TCP connection can
> be sent out on the UDP one and vice versa. Do I need a thread for
> each, or is there some other way I can listen on two sockets at once
> (maybe non-blocking ones?)
Try the select module:
http://www.python.org/doc/current/lib/module-select.html
Regards,
Dan
--
Dan Sommers
<http://www.tombstonezero.net/dan/>
More information about the Python-list
mailing list