chore(release): 0.3.0 #5

Merged
pufereq merged 30 commits from release/0.3.0 into main 2025-11-30 17:39:26 +00:00
4 changed files with 225 additions and 143 deletions
Showing only changes of commit bc62dbed66 - Show all commits

View File

@@ -106,14 +106,16 @@ 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: bytes = Message.hello(self.mac_address).to_bytes() hello_message: Message = Message.hello(self.mac_address)
self.outbound_buffer += hello_message self.send(hello_message)
self._send_outbound()
def close(self) -> None: def close(self) -> None:
"""Close the connection and clean up resources.""" """Close the connection and clean up resources."""
self.logger.debug("[*] Closing connection...") self.logger.debug("[*] Closing connection...")
self.selector.unregister(self.socket) try:
self.selector.unregister(self.socket)
except Exception as e:
self.logger.error(f"[!] Error unregistering socket: {e}")
self.socket.close() self.socket.close()
self.logger.debug("[.] Connection closed.") self.logger.debug("[.] Connection closed.")