summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/forkpool.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi/forkpool.py')
-rw-r--r--wsgitools/scgi/forkpool.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 3058316..0393bb1 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -1,5 +1,5 @@
"""
-The forkpool.SCGIServer adapts a wsgi application to a scgi service.
+The L{forkpool.SCGIServer} adapts a wsgi application to a scgi service.
It works with multiple processes that are periodically cleaned up to prevent
memory leaks having an impact to the system.
@@ -14,7 +14,7 @@ import errno
class SocketFileWrapper:
"""Wraps a socket to a wsgi-compliant file-like object."""
def __init__(self, sock, toread):
- """@param sock: is a socket.socket()"""
+ """@param sock: is a C{socket.socket()}"""
self.sock = sock
self.buff = ""
self.toread = toread
@@ -47,7 +47,8 @@ class SocketFileWrapper:
def close(self):
"""Does not close the socket, because it might still be needed. It
- reads all data that should have been read as given by CONTENT_LENGTH."""
+ reads all data that should have been read as given by C{CONTENT_LENGTH}.
+ """
try:
while self.toread > 0:
if self.toread > 4096:
@@ -155,8 +156,8 @@ class SocketFileWrapper:
map(self.write, lines)
class SCGIServer:
- """Usage: create an SCGIServer object and invoke the run method which will
- then turn this process into an scgi server."""
+ """Usage: create an L{SCGIServer} object and invoke the run method which
+ will then turn this process into an scgi server."""
class WorkerState:
"""state: 0 means idle and 1 means working.
These values are also sent as strings '0' and '1' over the socket."""
@@ -172,8 +173,8 @@ class SCGIServer:
@type port: int
@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
+ @param interface: is the interface to bind to (default: C{"localhost"})
+ @param error: is a file-like object beeing passed as C{wsgi.error} in
environ
@type minworkers: int
@param minworkers: is the number of worker processes to spawn