Kaydet (Commit) ca5feaba authored tarafından Georg Brandl's avatar Georg Brandl

bug [ 957505 ] SocketServer module documentation misleading

üst de7990b8
...@@ -95,8 +95,7 @@ To implement a service, you must derive a class from ...@@ -95,8 +95,7 @@ To implement a service, you must derive a class from
can then run various versions of the service by combining one of the server can then run various versions of the service by combining one of the server
classes with your request handler class. The request handler class must be classes with your request handler class. The request handler class must be
different for datagram or stream services. This can be hidden by using the different for datagram or stream services. This can be hidden by using the
mix-in request handler classes \class{StreamRequestHandler} or handler subclasses \class{StreamRequestHandler} or \class{DatagramRequestHandler}.
\class{DatagramRequestHandler}.
Of course, you still have to use your head! For instance, it makes no sense Of course, you still have to use your head! For instance, it makes no sense
to use a forking server if the service contains state in memory that can be to use a forking server if the service contains state in memory that can be
...@@ -279,11 +278,10 @@ information. ...@@ -279,11 +278,10 @@ information.
The type of \member{self.request} is different for datagram or stream The type of \member{self.request} is different for datagram or stream
services. For stream services, \member{self.request} is a socket services. For stream services, \member{self.request} is a socket
object; for datagram services, \member{self.request} is a string. object; for datagram services, \member{self.request} is a string.
However, this can be hidden by using the mix-in request handler However, this can be hidden by using the request handler subclasses
classes
\class{StreamRequestHandler} or \class{DatagramRequestHandler}, which \class{StreamRequestHandler} or \class{DatagramRequestHandler}, which
override the \method{setup()} and \method{finish()} methods, and override the \method{setup()} and \method{finish()} methods, and
provides \member{self.rfile} and \member{self.wfile} attributes. provide \member{self.rfile} and \member{self.wfile} attributes.
\member{self.rfile} and \member{self.wfile} can be read or written, \member{self.rfile} and \member{self.wfile} can be read or written,
respectively, to get the request data or return data to the client. respectively, to get the request data or return data to the client.
\end{funcdesc} \end{funcdesc}
......
...@@ -65,8 +65,8 @@ various versions of the service by combining one of the server classes ...@@ -65,8 +65,8 @@ various versions of the service by combining one of the server classes
with your request handler class. with your request handler class.
The request handler class must be different for datagram or stream The request handler class must be different for datagram or stream
services. This can be hidden by using the mix-in request handler services. This can be hidden by using the request handler
classes StreamRequestHandler or DatagramRequestHandler. subclasses StreamRequestHandler or DatagramRequestHandler.
Of course, you still have to use your head! Of course, you still have to use your head!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment