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,111
  • 21
  • 91
  • 136
Adam Matan
  • 128,757
  • 147
  • 397
  • 562

1 Answers1

2

In the documentation of RequestHandler.handle.

phihag
  • 278,196
  • 72
  • 453
  • 469