refactor(backend_server.py): refactor calls to Message class constructors after protocol changes

This commit is contained in:
2026-03-01 20:17:05 +01:00
parent f41a7774ec
commit fa2da207a9

View File

@@ -106,7 +106,7 @@ class BackendServer:
client (Client): The client to send the ACK to. client (Client): The client to send the ACK to.
target_id (str): The id of the ACK'd message. target_id (str): The id of the ACK'd message.
""" """
ack: bytes = Message.ack(target_id=target_id).to_bytes() ack: bytes = Message.Control.ack(target_id=target_id).to_bytes()
self.logger.info(f"[>] Sending ACK to {client}") self.logger.info(f"[>] Sending ACK to {client}")
client.outbound += ack client.outbound += ack
@@ -116,7 +116,7 @@ class BackendServer:
Args: Args:
client (Client): The client to send the CLOSE message to. client (Client): The client to send the CLOSE message to.
""" """
close_msg: bytes = Message.close().to_bytes() close_msg: bytes = Message.Control.close().to_bytes()
self.logger.info(f"[>] Sending CLOSE to {client}") self.logger.info(f"[>] Sending CLOSE to {client}")
client.outbound += close_msg client.outbound += close_msg