Beispiel #1
0
 def __init__(self, worker_id, inner_ip, inner_port, outer_socket):
     self.__worker_id = worker_id
     self.__state = self.State.NONE
     self.__inner_ip = inner_ip
     self.__inner_port = inner_port
     self.__connector = connector.Connector(outer_socket)
     self.__data_handler = data_handler.OutDataHandler()
Beispiel #2
0
 def __init__(self,worker_id,inner_socket):
     self.__worker_id = worker_id
     self.__state = self.State.NONE
     self.__connector = connector.Connector(inner_socket)
     self.__data_handler = data_handler.InnerDataHandler()
     self.__ring_buffer = ring_buffer.RingBuffer(1024 * 1024)
     if self.__connector.con_state == connector.CON_STATE.CON_CONNECTED:
         self.__state = self.State.WORKING
Beispiel #3
0
 def __init__(self, worker_id, tun_ip, outer_socket, address,
              sourth_interface_channel):
     self.__worker_id = worker_id
     self.__tun_ip = tun_ip
     self.__address = address
     self.__connector = connector.Connector(outer_socket)
     self.__data_handler = data_handler.OuterDataHandler()
     self.__ring_buffer = ring_buffer.TimeoutRingbuffer(10240 * 10240, 5)
     self.__state = self.State.NONE
     self.__sourth_interface_channel = sourth_interface_channel
Beispiel #4
0
 def __init__(self, worker_id, inner_socket, address,
              north_interface_channel, connector_change_callback):
     super(InnerWorker, self).__init__(worker_id, address,
                                       connector.Connector(inner_socket))
     self.__state = self.State.NONE
     self.__north_interface_channel = north_interface_channel
     self.__data_handler = data_handler.InnerDataHandler()
     self.__ring_buffer = ring_buffer.TimeoutRingbuffer(10240 * 10240, 5)
     self._connector_change_callback = connector_change_callback
     self.__tag = 'NONE'
Beispiel #5
0
 def __init__(self, worker_id, inner_ip, inner_port, outer_socket, address,
              sourth_interface_channel, connector_change_callback):
     super(OuterWorker, self).__init__(worker_id, address,
                                       connector.Connector(outer_socket))
     self.__inner_ip = inner_ip
     self.__inner_port = inner_port
     self.__state = self.State.NONE
     self.__sourth_interface_channel = sourth_interface_channel
     self.__data_handler = data_handler.OutDataHandler()
     self._connector_change_callback = connector_change_callback
     self.__connecting_begin_time = 0