tcpsockets/server.py
def starter(self) -> None:
        """
        The starter method is responsible for accepting connections from clients and passing them to the client_handler.
        Returns:
            None
        """
        self.running = True
        self.stopper_thread.start()
        logger.log(f"Listening for connections on {self.ip} at {self.port}")
        self.socket.listen(self.queue)
        client, address = self.socket.accept()
        while self.running:
            self.handling = True
            self.current_client = Client(client, address)
            logger.log(f"Connection from {address}")
            try:
                self.handler(self.current_client)
            except BaseException:
                logger.log(f"Client from {address} got disconnected due to an error: {traceback.format_exc()}")
            logger.log(f"Client from {address} disconnected")
            self.handling = False
            self.current_client = None
            client, address = self.socket.accept()
        self.socket.close()
        logger.log(f"Closed server")
        logger.close_log_files()

        The starter method is responsible for accepting connections from clients and passing them to the client_handler.
        Returns:
            None
        
The starter method is responsible for accepting connections from clients and passing them to the client_handler.
The starter method is responsible for accepting connections from clients and passing them to the client_handler .
def starter(self) -> None:
        self.running = True
        self.stopper_thread.start()
        logger.log(f"Listening for connections on {self.ip} at {self.port}")
        self.socket.listen(self.queue)
        client, address = self.socket.accept()
        while self.running:
            self.handling = True
            self.current_client = Client(client, address)
            logger.log(f"Connection from {address}")
            try:
                self.handler(self.current_client)
            except BaseException:
                logger.log(f"Client from {address} got disconnected due to an error: {traceback.format_exc()}")
            logger.log(f"Client from {address} disconnected")
            self.handling = False
            self.current_client = None
            client, address = self.socket.accept()
        self.socket.close()
        logger.log(f"Closed server")
        logger.close_log_files()
def starter ( self ) -> None : self . running = True self . stopper_thread . start ( ) logger . log ( f"Listening for connections on {self.ip} at {self.port}" ) self . socket . listen ( self . queue ) client , address = self . socket . accept ( ) while self . running : self . handling = True self . current_client = Client ( client , address ) logger . log ( f"Connection from {address}" ) try : self . handler ( self . current_client ) except BaseException : logger . log ( f"Client from {address} got disconnected due to an error: {traceback.format_exc()}" ) logger . log ( f"Client from {address} disconnected" ) self . handling = False self . current_client = None client , address = self . socket . accept ( ) self . socket . close ( ) logger . log ( f"Closed server" ) logger . close_log_files ( )
The starter method is responsible for accepting connections from clients and passing them to the client_handler.
The starter method is responsible for accepting connections from clients and passing them to the client_handler .
"""
        The starter method is responsible for accepting connections from clients and passing them to the client_handler.
        Returns:
            None
        """
None
self