Package wsgiwapi :: Package cpwsgiserver :: Class HTTPConnection
[frames] | no frames]

Class HTTPConnection

source code

object --+
         |
        HTTPConnection

An HTTP connection (active socket).

socket: the raw socket object (usually TCP) for this connection. wsgi_app: the WSGI application for this server/connection. environ: a WSGI environ template. This will be copied for each request.

rfile: a fileobject for reading from the socket. send: a function for writing (+ flush) to the socket.

Nested Classes
  RequestHandlerClass
An HTTP Request (and response).
Instance Methods
 
__init__(self, sock, wsgi_app, environ)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
communicate(self)
Read each request and respond appropriately.
source code
 
close(self)
Close the socket underlying this connection.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  rbufsize = -1
  environ = {"wsgi.version":(1, 0), "wsgi.url_scheme": "http", "...
Properties

Inherited from object: __class__

Method Details

__init__(self, sock, wsgi_app, environ)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

Class Variable Details

environ

Value:
{"wsgi.version":(1, 0), "wsgi.url_scheme": "http", "wsgi.multithread":\
 True, "wsgi.multiprocess": False, "wsgi.run_once": False, "wsgi.error\
s": sys.stderr,}