summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src/meshbay_common
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common')
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index e092353..4890d3b 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -96,6 +96,20 @@ class MNP:
# never serve the GEK in plaintext. Members obtain it by unwrapping their own
# ECIES bundle. The constants lingered after the handlers were deleted, leaving
# the wire contract looking as though the endpoint still existed.
+ # Transfer slots. A download is otherwise invisible to the node -- a series
+ # of independent file_req messages, with nothing saying one started or
+ # ended -- so there is nothing to count and nothing to cap. The lease is
+ # that missing object: `tr` is drawn by the client like `upload_id`, covers
+ # a job rather than a file, and dies with the connection.
+ #
+ # One reply type with a state field, not four: a client that must switch on
+ # the message type to discover it is still waiting is a client that will get
+ # one branch wrong. Carries no filename and no path -- `tr` is opaque,
+ # `bytes` and `chunks` are numbers -- so it stays in clear like
+ # INDEX_PROGRESS, for the same stated reason.
+ TRANSFER_OPEN = "transfer_open" # client -> node: I want a slot
+ TRANSFER_CLOSE = "transfer_close" # client -> node: I am done with it
+ TRANSFER_STATE = "transfer_state" # node -> client: granted/queued/closed
FILE_UPLOAD = "file_upload" # client pushes file chunk to node
FILE_UPLOAD_ACK = "file_upload_ack" # node acknowledges chunk receipt
DIR_CREATE = "dir_create" # client → node: make a directory