'Constructor.  May be extended, do not override.'

def __init__(self, listener, RequestHandlerClass, bind_and_activate=True):

    if hasattr(listener, 'getsockname'):
        SocketServer.BaseServer.__init__(self, listener.getsockname(), RequestHandlerClass)
        self.socket = listener
    else:
        SocketServer.ThreadingTCPServer.__init__(self, listener, RequestHandlerClass, bind_and_activate)
