@@ -116,23 +116,23 @@ server is the address family.
116
116
:class: `ForkingMixIn ` and the Forking classes mentioned below are
117
117
only available on POSIX platforms that support :func: `~os.fork `.
118
118
119
- :meth: `socketserver. ForkingMixIn.server_close ` waits until all child
119
+ :meth: `! ForkingMixIn.server_close ` waits until all child
120
120
processes complete, except if
121
- :attr: `socketserver. ForkingMixIn.block_on_close ` attribute is false.
121
+ :attr: `! ForkingMixIn.block_on_close ` attribute is false.
122
122
123
- :meth: `socketserver. ThreadingMixIn.server_close ` waits until all non-daemon
123
+ :meth: `! ThreadingMixIn.server_close ` waits until all non-daemon
124
124
threads complete, except if
125
- :attr: `socketserver. ThreadingMixIn.block_on_close ` attribute is false. Use
125
+ :attr: `! ThreadingMixIn.block_on_close ` attribute is false. Use
126
126
daemonic threads by setting
127
- :data: `ThreadingMixIn.daemon_threads ` to ``True `` to not wait until threads
127
+ :data: `! ThreadingMixIn.daemon_threads ` to ``True `` to not wait until threads
128
128
complete.
129
129
130
130
.. versionchanged :: 3.7
131
131
132
- :meth: `socketserver. ForkingMixIn.server_close ` and
133
- :meth: `socketserver. ThreadingMixIn.server_close ` now waits until all
132
+ :meth: `! ForkingMixIn.server_close ` and
133
+ :meth: `! ThreadingMixIn.server_close ` now waits until all
134
134
child processes and non-daemonic threads complete.
135
- Add a new :attr: `socketserver. ForkingMixIn.block_on_close ` class
135
+ Add a new :attr: `! ForkingMixIn.block_on_close ` class
136
136
attribute to opt-in for the pre-3.7 behaviour.
137
137
138
138
@@ -412,13 +412,13 @@ Request Handler Objects
412
412
413
413
This function must do all the work required to service a request. The
414
414
default implementation does nothing. Several instance attributes are
415
- available to it; the request is available as :attr: `self. request `; the client
416
- address as :attr: `self. client_address `; and the server instance as
417
- :attr: `self. server `, in case it needs access to per-server information.
415
+ available to it; the request is available as :attr: `request `; the client
416
+ address as :attr: `client_address `; and the server instance as
417
+ :attr: `server `, in case it needs access to per-server information.
418
418
419
- The type of :attr: `self. request ` is different for datagram or stream
420
- services. For stream services, :attr: `self. request ` is a socket object; for
421
- datagram services, :attr: `self. request ` is a pair of string and socket.
419
+ The type of :attr: `request ` is different for datagram or stream
420
+ services. For stream services, :attr: `request ` is a socket object; for
421
+ datagram services, :attr: `request ` is a pair of string and socket.
422
422
423
423
424
424
.. method :: finish()
@@ -428,20 +428,42 @@ Request Handler Objects
428
428
raises an exception, this function will not be called.
429
429
430
430
431
+ .. attribute :: request
432
+
433
+ The *new * :class: `socket.socket ` object
434
+ to be used to communicate with the client.
435
+
436
+
437
+ .. attribute :: client_address
438
+
439
+ Client address returned by :meth: `BaseServer.get_request `.
440
+
441
+
442
+ .. attribute :: server
443
+
444
+ :class: `BaseServer ` object used for handling the request.
445
+
446
+
431
447
.. class :: StreamRequestHandler
432
448
DatagramRequestHandler
433
449
434
450
These :class: `BaseRequestHandler ` subclasses override the
435
451
:meth: `~BaseRequestHandler.setup ` and :meth: `~BaseRequestHandler.finish `
436
- methods, and provide :attr: `self.rfile ` and :attr: `self.wfile ` attributes.
437
- The :attr: `self.rfile ` and :attr: `self.wfile ` attributes can be
438
- read or written, respectively, to get the request data or return data
439
- to the client.
440
- The :attr: `!rfile ` attributes support the :class: `io.BufferedIOBase ` readable interface,
441
- and :attr: `!wfile ` attributes support the :class: `!io.BufferedIOBase ` writable interface.
452
+ methods, and provide :attr: `rfile ` and :attr: `wfile ` attributes.
453
+
454
+ .. attribute :: rfile
455
+
456
+ A file object from which receives the request is read.
457
+ Support the :class: `io.BufferedIOBase ` readable interface.
458
+
459
+ .. attribute :: wfile
460
+
461
+ A file object to which the reply is written.
462
+ Support the :class: `io.BufferedIOBase ` writable interface
463
+
442
464
443
465
.. versionchanged :: 3.6
444
- :attr: `StreamRequestHandler. wfile ` also supports the
466
+ :attr: `wfile ` also supports the
445
467
:class: `io.BufferedIOBase ` writable interface.
446
468
447
469
0 commit comments