refactor(connector.py): refactor calls to Message class constructors after protocol changes
This commit is contained in:
@@ -107,7 +107,7 @@ class Connector:
|
|||||||
def send_hello(self) -> None:
|
def send_hello(self) -> None:
|
||||||
"""Send a HELLO message to the server."""
|
"""Send a HELLO message to the server."""
|
||||||
self.logger.debug("[*] Sending HELLO message...")
|
self.logger.debug("[*] Sending HELLO message...")
|
||||||
hello_message: Message = Message.hello(self.mac_address)
|
hello_message: Message = Message.Control.hello(self.mac_address)
|
||||||
self.send(hello_message)
|
self.send(hello_message)
|
||||||
|
|
||||||
def close(self) -> None:
|
def close(self) -> None:
|
||||||
@@ -218,7 +218,9 @@ class Connector:
|
|||||||
self.on_message(message)
|
self.on_message(message)
|
||||||
|
|
||||||
if message.ack_required:
|
if message.ack_required:
|
||||||
ack_message: Message = Message.ack(message.id)
|
ack_message: Message = Message.Control.ack(
|
||||||
|
message.id
|
||||||
|
)
|
||||||
self.send(ack_message)
|
self.send(ack_message)
|
||||||
self._send_outbound()
|
self._send_outbound()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user