def __init__(self): self._config: dict self.clients: list self._server_socket: socket.socket self.db_connector: Connector self.is_running: bool self._sel: selectors.DefaultSelector self.lock_clients: threading.RLock self._config = None self.clients = None self._server_socket = None self.db_connector = None self.is_running = False self._sel = None self.lock_clients = threading.RLock() EventManager.register_handler(CONNECT_CLIENT_EVENT, self._handle_connect_client) EventManager.register_handler(DISCONNECTED_CLIENT_EVENT, self._handle_disconnect_client) signal.signal(signal.SIGINT, self.stop)
def __init__(self): super().__init__() self.file_fetch_dict = FileFetchDict() EventManager.register_handler(DISCONNECTED_CLIENT_EVENT, self._check_disconnect_client)