chore(release): 0.5.0 #13
@@ -32,7 +32,7 @@ class Client:
|
|||||||
)
|
)
|
||||||
self.logger.debug(f"Initializing Client {addr}...")
|
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.last_seen: float = 0.0 # unix timestanp of last inbound message
|
||||||
self.status: ClientStatus = ClientStatus.CONNECTED
|
self.status: ClientStatus = ClientStatus.CONNECTED
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ class Client:
|
|||||||
self.outbound: bytes = b""
|
self.outbound: bytes = b""
|
||||||
|
|
||||||
def __str__(self) -> str:
|
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:
|
def __repr__(self) -> str:
|
||||||
return f"Client({self.mac_id}, {self.addr})"
|
return f"Client({self.id}, {self.addr})"
|
||||||
|
|
||||||
def disconnect(self) -> None:
|
def disconnect(self) -> None:
|
||||||
"""Disconnect the client and close the socket."""
|
"""Disconnect the client and close the socket."""
|
||||||
|
|||||||
Reference in New Issue
Block a user