def __init__(self, connection_handler_class=None, params=(), thread_name='', thread_class=None):
        if thread_class is None:
            thread_class = threading.Thread
        self._thread_class = thread_class
        if connection_handler_class is None:
            connection_handler_class = EchoHandler
        self.connection_handler_class = connection_handler_class
        self._params = params
        self._block = None
        self._shutdown_event = threading.Event()
        self._thread_name = thread_name