summaryrefslogtreecommitdiff
path: root/wsgitools/scgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi.py')
-rw-r--r--wsgitools/scgi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/wsgitools/scgi.py b/wsgitools/scgi.py
index 477acf9..c12a296 100644
--- a/wsgitools/scgi.py
+++ b/wsgitools/scgi.py
@@ -168,7 +168,16 @@ class SCGIConnection(asyncore.dispatcher):
__all__.append("SCGIServer")
class SCGIServer(asyncore.dispatcher):
+ """SCGI Server for WSGI applications. It does not use multiple processes or
+ multiple threads."""
def __init__(self, wsgiapp, port, interface="localhost", error=sys.stderr):
+ """wsgiapp is the wsgi application to be run.
+ port is an int representing the TCP port number to be used.
+ interface is a string specifying the network interface to bind which
+ defaults to "localhost" making the server inaccessible over
+ network.
+ error is a file-like object being passed as wsgi.error in the environ
+ parameter defaulting to stderr."""
asyncore.dispatcher.__init__(self)
self.wsgiapp = wsgiapp
self.error = error
@@ -185,5 +194,7 @@ class SCGIServer(asyncore.dispatcher):
SCGIConnection(self, conn, addr)
def run(self):
+ """Runs the server. It will not return and you can invoke
+ asyncore.loop() instead achieving the same effect."""
asyncore.loop()