diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2011-11-11 18:58:53 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2011-11-11 18:58:53 (GMT) |
commit | f8240d6564c6d8f166256fca9b0fb6e9b89c7db1 (patch) | |
tree | f0f1e1ebbf75dcc65ca3c435b1879329d90e0e70 /Doc/library/socketserver.rst | |
parent | e41f0de84d286f0362e1c9e23a535aba827e109f (diff) | |
parent | 599d76b2754f5391abb0aadae96a444065e52b5c (diff) | |
download | cpython-f8240d6564c6d8f166256fca9b0fb6e9b89c7db1.zip cpython-f8240d6564c6d8f166256fca9b0fb6e9b89c7db1.tar.gz cpython-f8240d6564c6d8f166256fca9b0fb6e9b89c7db1.tar.bz2 |
Merge 3.2, doc typos.
Diffstat (limited to 'Doc/library/socketserver.rst')
-rw-r--r-- | Doc/library/socketserver.rst | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index 8623380..497e3ee 100644 --- a/Doc/library/socketserver.rst +++ b/Doc/library/socketserver.rst @@ -39,11 +39,12 @@ process one or many requests. When inheriting from :class:`ThreadingMixIn` for threaded connection behavior, you should explicitly declare how you want your threads to behave on an abrupt -shutdown. The :class:`ThreadingMixIn` class defines an attribute +shutdown. The :class:`ThreadingMixIn` class defines an attribute *daemon_threads*, which indicates whether or not the server should wait for -thread termination. You should set the flag explicitly if you would like threads -to behave autonomously; the default is :const:`False`, meaning that Python will -not exit until all threads created by :class:`ThreadingMixIn` have exited. +thread termination. You should set the flag explicitly if you would like +threads to behave autonomously; the default is :const:`False`, meaning that +Python will not exit until all threads created by :class:`ThreadingMixIn` have +exited. Server classes have the same external methods and attributes, no matter what network protocol they use. @@ -115,8 +116,8 @@ or inappropriate for the service) is to maintain an explicit table of partially finished requests and to use :func:`select` to decide which request to work on next (or whether to handle a new incoming request). This is particularly important for stream services where each client can potentially be connected for -a long time (if threads or subprocesses cannot be used). See :mod:`asyncore` for -another way to manage this. +a long time (if threads or subprocesses cannot be used). See :mod:`asyncore` +for another way to manage this. .. XXX should data and methods be intermingled, or separate? how should the distinction between class and instance variables be drawn? @@ -153,9 +154,9 @@ Server Objects .. method:: BaseServer.serve_forever(poll_interval=0.5) Handle requests until an explicit :meth:`shutdown` request. Polls for - shutdown every *poll_interval* seconds. It also calls + shutdown every *poll_interval* seconds. It also calls :meth:`service_actions` which may be used by a subclass or Mixin to provide - various cleanup actions. For e.g. ForkingMixin class uses + various cleanup actions. For e.g. ForkingMixin class uses :meth:`service_actions` to cleanup the zombie child processes. .. versionchanged:: 3.3 @@ -205,7 +206,7 @@ The server classes support the following class variables: .. attribute:: BaseServer.allow_reuse_address - Whether the server will allow the reuse of an address. This defaults to + Whether the server will allow the reuse of an address. This defaults to :const:`False`, and can be set in subclasses to change the policy. @@ -282,7 +283,7 @@ users of the server object. .. method:: BaseServer.server_activate() Called by the server's constructor to activate the server. The default behavior - just :meth:`listen`\ s to the server's socket. May be overridden. + just :meth:`listen`\ s to the server's socket. May be overridden. .. method:: BaseServer.server_bind() @@ -293,10 +294,10 @@ users of the server object. .. method:: BaseServer.verify_request(request, client_address) - Must return a Boolean value; if the value is :const:`True`, the request will be - processed, and if it's :const:`False`, the request will be denied. This function - can be overridden to implement access controls for a server. The default - implementation always returns :const:`True`. + Must return a Boolean value; if the value is :const:`True`, the request will + be processed, and if it's :const:`False`, the request will be denied. This + function can be overridden to implement access controls for a server. The + default implementation always returns :const:`True`. RequestHandler Objects |