summaryrefslogtreecommitdiff
path: root/wsgitools/scgi
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2008-02-28 14:03:55 +0100
committerHelmut Grohne <helmut@subdivi.de>2008-02-28 14:03:55 +0100
commitda7964ce7cbdc0e28c4558caabcf36d384253ed1 (patch)
treefcf9bc383e46bfd64eacc8ebbd5a6b357f3d6ce0 /wsgitools/scgi
parentaa85b52862c598afab383e777688feb9648cfbf0 (diff)
downloadwsgitools-da7964ce7cbdc0e28c4558caabcf36d384253ed1.tar.gz
refactored docstrings for epydoc
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r--wsgitools/scgi/asynchronous.py17
-rw-r--r--wsgitools/scgi/forkpool.py26
2 files changed, 27 insertions, 16 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 4953b05..4b1ed8f 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -179,13 +179,16 @@ 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."""
+ """
+ @param wsgiapp: is the wsgi application to be run.
+ @type port: number
+ @param port: is an int representing the TCP port number to be used.
+ @type interface: str
+ @param interface: is a string specifying the network interface to bind
+ which defaults to "localhost" making the server inaccessible
+ over network.
+ @param 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
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index bc1be08..44dd362 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -6,7 +6,7 @@ import sys
class SocketFileWrapper:
"""Wraps a socket to a wsgi-compliant file-like object."""
def __init__(self, sock):
- """@param sock is a socket.socket()"""
+ """@param sock: is a socket.socket()"""
self.sock = sock
self.buff = ""
def read(self, size=None):
@@ -77,14 +77,22 @@ class SCGIServer:
def __init__(self, wsgiapp, port, interface="localhost", error=sys.stderr,
minworkers=2, maxworkers=32, maxrequests=1000):
- """Parameters:
- wsgiapp is the WSGI application to be run.
- port is the tcp port to listen on
- interface is the interface to bind to (default: "localhost")
- error is a filelike object beeing passed as wsgi.error in environ
- minworkers is the number of worker processes to spawn
- maxworkers is the maximum number of workers that can be spawned on demand
- maxrequests is the number of requests a worker processes before dying
+ """
+ @param wsgiapp: is the WSGI application to be run.
+ @type port: number
+ @param port: is the tcp port to listen on
+ @type interface: str
+ @param interface: is the interface to bind to (default: "localhost")
+ @param error: is a filelike object beeing passed as wsgi.error in
+ environ
+ @type minworkers: number
+ @param minworkers: is the number of worker processes to spawn
+ @type maxworkers: number
+ @param maxworkers: is the maximum number of workers that can be spawned
+ on demand
+ @type maxrequests: number
+ @param maxrequests: is the number of requests a worker processes before
+ dying
"""
assert hasattr(error, "write")
self.wsgiapp = wsgiapp