what is a request object in python socketserver api
In python socketserver api, as well as xmlrpcserver, there are mentioned many times the request object,for example:
SimpleXMLRPCServer.process_request(self, request, client_address):
But I cannot find any description to this request object. What is it ? where in the python doc can I find th开发者_StackOverflowe the expaination(it's attribute,method,etc) of the request object?
You can use the source (of SocketServer.py in this case) to answer such questions. process_request is called in _handle_request_noblock, which gets the request from get_request. What that does depends on the SocketServer subclass. For a TCPServer, you'll find that it is the result of the socket accept() call.
精彩评论