开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜