UDPServer bug or wrong doc?

Wilson Tam wilson at imajet.com
Fri Nov 17 05:13:48 EST 2000


Hi all,

I would like to check it is a bug in the SocketServer.py or error in the
document about the UDPServer. The document says...

handle ()
   ...For stream services, self.request is a socket object; for datagram
services, self.request is a string. ....

However, I find that it doesn't really return a string when I try.
I look at the SocketServer.py, it codes (at arround line 275)...

    def get_request(self):
        data, client_addr = self.socket.recvfrom(self.max_packet_size)
        return (data, self.socket), client_addr


which actually return a turple.

I wonder which one is correct and will be used in the future version,
the document or the code? Any comment?


Thanks,
Wilson Tam




More information about the Python-list mailing list