This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alzheimer
Date 2007-08-04.09:21:27
SpamBayes Score
Marked as misclassified
I seem to have misunderstood SocketServer completely, maybe someone can tell me if I was using the wrong thing after all.

I wanted to implement an UDP protocol in Python. For sending and receiving UDP packets, I chose SocketServer.UDPSocketServer along with the DatagramRequestHandler.

It is probably implied, but did not become clear to me just by reading the documentation, that apparently a server is meant to send back a packet for every packet it receives, no matter what. Which in turn means that you can't have servers talk to other servers, because they'd be sending packets back and forth endlessly then.

At least, that's what the DatagramRequestHandler is doing. It issues a socket.sendto in its finish() routine. Took me a while to find out where all the empty packets where coming from...

Does it make sense at all for an UDP server to do this? Sure, it works for simple protocols that do nothing but query/answer. But it's really useless for anything else.

The documentation could be more verbose on this behaviour, in any case.
Date User Action Args
2007-08-23 14:59:03adminlinkissue1767511 messages
2007-08-23 14:59:03admincreate