summaryrefslogtreecommitdiffstats
path: root/Lib/SocketServer.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-11-30 15:07:01 (GMT)
committerGuido van Rossum <guido@python.org>1998-11-30 15:07:01 (GMT)
commit67a40e814ca29a8b886d0db018995f9b518785e8 (patch)
tree27bf81930280203558c1b495ce67f24330333e1d /Lib/SocketServer.py
parent42f5298ab5f59efd130b3c5a0c77f08b5f938085 (diff)
downloadcpython-67a40e814ca29a8b886d0db018995f9b518785e8.zip
cpython-67a40e814ca29a8b886d0db018995f9b518785e8.tar.gz
cpython-67a40e814ca29a8b886d0db018995f9b518785e8.tar.bz2
Patch by Jeff Bauer: a minor change to declare two new
threaded versions of Unix Server classes, using the ThreadingMixIn class: ThreadingUnixStreamServer ThreadingUnixDatagramServer
Diffstat (limited to 'Lib/SocketServer.py')
-rw-r--r--Lib/SocketServer.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py
index 15558f2..23f3a8e 100644
--- a/Lib/SocketServer.py
+++ b/Lib/SocketServer.py
@@ -273,18 +273,6 @@ class UDPServer(TCPServer):
pass
-if hasattr(socket, 'AF_UNIX'):
-
- class UnixStreamServer(TCPServer):
-
- address_family = socket.AF_UNIX
-
-
- class UnixDatagramServer(UDPServer):
-
- address_family = socket.AF_UNIX
-
-
class ForkingMixIn:
"""Mix-in class to handle each request in a new process."""
@@ -339,6 +327,17 @@ class ForkingTCPServer(ForkingMixIn, TCPServer): pass
class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
class ThreadingTCPServer(ThreadingMixIn, TCPServer): pass
+if hasattr(socket, 'AF_UNIX'):
+
+ class UnixStreamServer(TCPServer):
+ address_family = socket.AF_UNIX
+
+ class UnixDatagramServer(UDPServer):
+ address_family = socket.AF_UNIX
+
+ class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): pass
+
+ class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): pass
class BaseRequestHandler: