Q: How to UDPServer ??
Andrew Bennetts
andrew-pythonlist at puzzling.org
Thu Jan 2 18:09:50 EST 2003
On Thu, Jan 02, 2003 at 03:03:07PM +0800, Ripper John wrote:
>
> You are right! serve_forever() can work!
> But, how can I run both servers in a .py file?
You might find Twisted <http://twistedmatrix.com/> to be useful. It can
listen on an arbitrary number of ports (both UDP and TCP) in a single
thread.
This doc explains how to write simple servers with Twisted:
http://twistedmatrix.com/documents/howto/servers
-Andrew.
More information about the Python-list
mailing list