First real commit, everything implemented

This commit is contained in:
Josiah Baldwin
2024-11-20 15:23:03 -08:00
parent 69afbfeba7
commit 5c20a2b8fb
36 changed files with 3625 additions and 282 deletions

View File

@@ -14,4 +14,23 @@ class SocketError(MeshCtrlError):
"""
Represents an error in the websocket
"""
pass
class FileTransferError(MeshCtrlError):
"""
Represents a failed file transfer
Attributes:
stats (dict): {"result" (str): Human readable result, "size" (int): number of bytes successfully transferred}
initialized (asyncio.Event): Event marking if the Session initialization has finished. Wait on this to wait for a connection.
alive (bool): Whether the session connection is currently alive
closed (asyncio.Event): Event that occurs when the session closes permanently
"""
def __init__(self, message, stats):
self.stats = stats
class FileTransferCancelled(FileTransferError):
"""
Represents a canceled file transfer
"""
pass