Beispiel #1
0
 def start(self):
     """Start the connection up"""
     if self.connection_closed.is_set():
         self._read_pipe, self._write_pipe = create_pipe()
         self.connection_closed.clear()
     if self._connection_routine:
         raise Exception("Unable to start, connection routine already " "active.")
     self._connection_routine = self.handler.spawn(self.zk_loop)
Beispiel #2
0
 def start(self):
     """Start the connection up"""
     if self.connection_closed.is_set():
         self._read_pipe, self._write_pipe = create_pipe()
         self.connection_closed.clear()
     if self._connection_routine:
         raise Exception("Unable to start, connection routine already "
                         "active.")
     self._connection_routine = self.handler.spawn(self.zk_loop)
Beispiel #3
0
    def __init__(self, client, retry_sleeper, log_debug=False):
        self.client = client
        self.handler = client.handler
        self.retry_sleeper = retry_sleeper

        # Our event objects
        self.connection_stopped = client.handler.event_object()
        self.connection_stopped.set()

        self._read_pipe, self._write_pipe = create_pipe()

        self.log_debug = log_debug
        self._socket = None
        self._xid = None
        self._rw_server = None
        self._ro_mode = False
Beispiel #4
0
 def start(self):
     """Start the connection up"""
     if self.connection_closed.is_set():
         self._read_pipe, self._write_pipe = create_pipe()
         self.connection_closed.clear()
     self.handler.spawn(self.zk_loop)
Beispiel #5
0
 def start(self):
     """Start the connection up"""
     if self.connection_closed.is_set():
         self._read_pipe, self._write_pipe = create_pipe()
         self.connection_closed.clear()
     self.handler.spawn(self.zk_loop)