refactor(client.py): rename Client.mac_id -> Client.id

This commit is contained in:
2026-02-28 20:47:37 +01:00
parent 6971548589
commit b265feba7a

View File

@@ -32,7 +32,7 @@ class Client:
)
self.logger.debug(f"Initializing Client {addr}...")
self.mac_id: str | None = mac_id
self.id: str | None = mac_id
self.last_seen: float = 0.0 # unix timestanp of last inbound message
self.status: ClientStatus = ClientStatus.CONNECTED
@@ -42,10 +42,10 @@ class Client:
self.outbound: bytes = b""
def __str__(self) -> str:
return f"Client({self.mac_id} ({self.addr[0]}:{self.addr[1]}))"
return f"Client({self.id} ({self.addr[0]}:{self.addr[1]}))"
def __repr__(self) -> str:
return f"Client({self.mac_id}, {self.addr})"
return f"Client({self.id}, {self.addr})"
def disconnect(self) -> None:
"""Disconnect the client and close the socket."""