@@ -116,23 +116,28 @@ server is the address family.
116116 :class: `ForkingMixIn ` and the Forking classes mentioned below are
117117 only available on POSIX platforms that support :func: `~os.fork `.
118118
119- :meth: `socketserver.ForkingMixIn.server_close ` waits until all child
120- processes complete, except if
121- :attr: `socketserver.ForkingMixIn.block_on_close ` attribute is false.
119+ .. attribute :: block_on_close
122120
123- :meth: `socketserver.ThreadingMixIn.server_close ` waits until all non-daemon
124- threads complete, except if
125- :attr: `socketserver.ThreadingMixIn.block_on_close ` attribute is false. Use
126- daemonic threads by setting
127- :data: `ThreadingMixIn.daemon_threads ` to ``True `` to not wait until threads
128- complete.
121+ :meth: `ForkingMixIn.server_close <BaseServer.server_close> `
122+ waits until all child processes complete, except if
123+ :attr: `block_on_close ` attribute is ``False ``.
124+
125+ :meth: `ThreadingMixIn.server_close <BaseServer.server_close> `
126+ waits until all non-daemon threads complete, except if
127+ :attr: `block_on_close ` attribute is ``False ``.
128+
129+ .. attribute :: daemon_threads
130+
131+ For :class: `ThreadingMixIn ` use daemonic threads by setting
132+ :data: `ThreadingMixIn.daemon_threads <daemon_threads> `
133+ to ``True `` to not wait until threads complete.
129134
130135 .. versionchanged :: 3.7
131136
132- :meth: `socketserver. ForkingMixIn.server_close ` and
133- :meth: `socketserver. ThreadingMixIn.server_close ` now waits until all
137+ :meth: `ForkingMixIn.server_close <BaseServer.server_close> ` and
138+ :meth: `ThreadingMixIn.server_close <BaseServer.server_close> ` now waits until all
134139 child processes and non-daemonic threads complete.
135- Add a new :attr: `socketserver. ForkingMixIn.block_on_close ` class
140+ Add a new :attr: `ForkingMixIn.block_on_close <block_on_close> ` class
136141 attribute to opt-in for the pre-3.7 behaviour.
137142
138143
@@ -406,13 +411,13 @@ Request Handler Objects
406411
407412 This function must do all the work required to service a request. The
408413 default implementation does nothing. Several instance attributes are
409- available to it; the request is available as :attr: `self. request `; the client
410- address as :attr: `self. client_address `; and the server instance as
411- :attr: `self. server `, in case it needs access to per-server information.
414+ available to it; the request is available as :attr: `request `; the client
415+ address as :attr: `client_address `; and the server instance as
416+ :attr: `server `, in case it needs access to per-server information.
412417
413- The type of :attr: `self. request ` is different for datagram or stream
414- services. For stream services, :attr: `self. request ` is a socket object; for
415- datagram services, :attr: `self. request ` is a pair of string and socket.
418+ The type of :attr: `request ` is different for datagram or stream
419+ services. For stream services, :attr: `request ` is a socket object; for
420+ datagram services, :attr: `request ` is a pair of string and socket.
416421
417422
418423 .. method :: finish()
@@ -422,20 +427,42 @@ Request Handler Objects
422427 raises an exception, this function will not be called.
423428
424429
430+ .. attribute :: request
431+
432+ The *new * :class: `socket.socket ` object
433+ to be used to communicate with the client.
434+
435+
436+ .. attribute :: client_address
437+
438+ Client address returned by :meth: `BaseServer.get_request `.
439+
440+
441+ .. attribute :: server
442+
443+ :class: `BaseServer ` object used for handling the request.
444+
445+
425446.. class :: StreamRequestHandler
426447 DatagramRequestHandler
427448
428449 These :class: `BaseRequestHandler ` subclasses override the
429450 :meth: `~BaseRequestHandler.setup ` and :meth: `~BaseRequestHandler.finish `
430- methods, and provide :attr: `self.rfile ` and :attr: `self.wfile ` attributes.
431- The :attr: `self.rfile ` and :attr: `self.wfile ` attributes can be
432- read or written, respectively, to get the request data or return data
433- to the client.
434- The :attr: `!rfile ` attributes support the :class: `io.BufferedIOBase ` readable interface,
435- and :attr: `!wfile ` attributes support the :class: `!io.BufferedIOBase ` writable interface.
451+ methods, and provide :attr: `rfile ` and :attr: `wfile ` attributes.
452+
453+ .. attribute :: rfile
454+
455+ A file object from which receives the request is read.
456+ Support the :class: `io.BufferedIOBase ` readable interface.
457+
458+ .. attribute :: wfile
459+
460+ A file object to which the reply is written.
461+ Support the :class: `io.BufferedIOBase ` writable interface
462+
436463
437464 .. versionchanged :: 3.6
438- :attr: `StreamRequestHandler. wfile ` also supports the
465+ :attr: `wfile ` also supports the
439466 :class: `io.BufferedIOBase ` writable interface.
440467
441468
0 commit comments