feat(backend_server.py): add BackendServer._send_ack() helper method

This commit is contained in:
2025-08-29 15:20:02 +02:00
parent 2922123a70
commit f2b4811145

View File

@@ -60,6 +60,16 @@ class BackendServer:
) )
time.sleep(1) time.sleep(1)
def _send_ack(self, client: Client) -> None:
"""Send an ACK message to a client.
Args:
client (Client): The client to send the ACK to.
"""
ack: bytes = Message.ack().to_bytes()
self.logger.debug(f"[>] Sending ACK to {client}")
client.outbound += ack
def _accept_connection(self, sock: socket.socket) -> None: def _accept_connection(self, sock: socket.socket) -> None:
"""Accept a new client connection. """Accept a new client connection.