def __init__(self, client_socket, server):
     self.socket = client_socket.getHandle()
     self.socket.setblocking(False)
     self.lock = threading.RLock()
     self._server = server
     self._timer = None
     self.len = 0
     self.message = b''
     self.context = TServer.TRpcConnectionContext(client_socket)
     self._server.serverEventHandler.newConnection(self.context)
     self._set_status(WAIT_LEN)
Beispiel #2
0
 def __init__(self, client_socket, wake_up, server_event_handler):
     self.socket = client_socket.getHandle()
     self.socket.setblocking(False)
     self._set_status(WAIT_LEN)
     self.len = 0
     self.message = b''
     self.lock = threading.Lock()
     self.wake_up = wake_up
     self.server_event_handler = server_event_handler
     self.context = TServer.TRpcConnectionContext(client_socket)
     self.server_event_handler.newConnection(self.context)