From 67a40e814ca29a8b886d0db018995f9b518785e8 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 30 Nov 1998 15:07:01 +0000 Subject: Patch by Jeff Bauer: a minor change to declare two new threaded versions of Unix Server classes, using the ThreadingMixIn class: ThreadingUnixStreamServer ThreadingUnixDatagramServer --- Lib/SocketServer.py | 23 +++++++++++------------ 1 file 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: -- cgit v0.12