Mailing List Archive

[ python-Bugs-1767511 ] SocketServer.DatagramRequestHandler
Bugs item #1767511, was opened at 2007-08-04 11:21
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767511&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alzheimer (alzheimer)
Assigned to: Nobody/Anonymous (nobody)
Summary: SocketServer.DatagramRequestHandler

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767511&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com