5

I've been playing around with Python's SocketServer:

#!/usr/bin/python
import SocketServer
class EchoHandler(SocketServer.BaseRequestHandler):
 def handle(self):
 data=self.request.recv(1024)
 self.request.send(data)
HOST, PORT = "localhost", 9999
server = SocketServer.TCPServer((HOST, PORT), TCPEchoServer)
server.serve_forever() 

From reading the source, I know that RequestHandler.__init__() receives request as a parameter and keeps a reference to it in self.request.

Where can I find the specifications for the request object?

tshepang
12.5k25 gold badges98 silver badges140 bronze badges
asked Jun 18, 2011 at 9:03

1 Answer 1

2
answered Jun 18, 2011 at 9:31
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. Don't know how I missed it.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.