[docs] 21.21.4.1. socketserver.TCPServer

chinaxun827 chinaxun827 at 163.com
Mon Jan 25 10:10:08 EST 2016


importsocketserverclassMyTCPHandler(socketserver.BaseRequestHandler):"""    The RequestHandler class for our server.    It is instantiated once per connection to the server, and must    override the handle() method to implement communication to the    client.    """defhandle(self):# self.request is the TCP socket connected to the clientself.data=self.request.recv(1024).strip()https://docs.python.org/3.4/library/socketserver.html


Excuse me.


 I have not found the request method in socketserver.BaseRequestHandler or socketserver.BaseRequestHandler.handle
by <.__dict__>


I don't know how this example worked. Maybe this is just a "hidden" usage?


Is there a way to look up every attributes and methods of a class or a method? Please tell me if you know how to.


    Thanks in advance.


            George, Yan





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20160125/3a87cf1c/attachment.html>


More information about the docs mailing list