feat(backend_server.py): add BackendServer._send_ack() helper method
This commit is contained in:
@@ -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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user