def __init__(self, ip="0.0.0.0", port=3671, valueCache=None):
        """Initialize the connection to the given host/port

        Initialized the connection, but does not connect.
        """
        self.remote_ip = ip
        self.remote_port = port
        self.discovery_port = None
        self.data_port = None
        self.connected = False
        self.result_queue = queue.Queue()
        self.ack_semaphore = threading.Semaphore(0)
        self.conn_state_ack_semaphore = threading.Semaphore(0)
        if valueCache is None:
            self.value_cache = ValueCache()
        else:
            self.value_cache = valueCache
        self.connection_state = 0
        self.keepalive_thread = threading.Thread(target=self.keepalive,
                                                 args=())
        self.keepalive_thread.daemon = True
        self.keepalive_thread.start()
        self._lock = threading.Lock()
        self._write_delay = 0.05
def __init__ ( self , ip = "0.0.0.0" , port = 3671 , valueCache = None ) : self . remote_ip = ip self . remote_port = port self . discovery_port = None self . data_port = None self . connected = False self . result_queue = queue . Queue ( ) self . ack_semaphore = threading . Semaphore ( 0 ) self . conn_state_ack_semaphore = threading . Semaphore ( 0 ) if valueCache is None : self . value_cache = ValueCache ( ) else : self . value_cache = valueCache self . connection_state = 0 self . keepalive_thread = threading . Thread ( target = self . keepalive , args = ( ) ) self . keepalive_thread . daemon = True self . keepalive_thread . start ( ) self . _lock = threading . Lock ( ) self . _write_delay = 0.05
Initialize the connection to the given host/port

        Initialized the connection, but does not connect.