summaryrefslogtreecommitdiff
path: root/Lib/dos-8x3/socketse.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-08-12 02:38:11 +0000
committerGuido van Rossum <guido@python.org>1998-08-12 02:38:11 +0000
commite03c05059534b4783c5631517cb16f79531358e8 (patch)
tree82285bf56d90ac5c062f328516a959dd416b8e45 /Lib/dos-8x3/socketse.py
parent887d072cc04be23e6758257b326499bd1572b929 (diff)
downloadcpython-git-e03c05059534b4783c5631517cb16f79531358e8.tar.gz
The usual.
Diffstat (limited to 'Lib/dos-8x3/socketse.py')
-rwxr-xr-xLib/dos-8x3/socketse.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/dos-8x3/socketse.py b/Lib/dos-8x3/socketse.py
index cf8a365fb8..0d0caac772 100755
--- a/Lib/dos-8x3/socketse.py
+++ b/Lib/dos-8x3/socketse.py
@@ -265,7 +265,12 @@ class UDPServer(TCPServer):
max_packet_size = 8192
def get_request(self):
- return self.socket.recvfrom(self.max_packet_size)
+ data, client_addr = self.socket.recvfrom(self.max_packet_size)
+ return (data, self.socket), client_addr
+
+ def server_activate(self):
+ # No need to call listen() for UDP.
+ pass
if hasattr(socket, 'AF_UNIX'):
@@ -411,4 +416,4 @@ class DatagramRequestHandler(BaseRequestHandler):
self.wfile = StringIO.StringIO(self.packet)
def finish(self):
- self.socket.send(self.wfile.getvalue())
+ self.socket.sendto(self.wfile.getvalue(), self.client_address)