Expand description
Wire protocol message types shared between client and server.
Control messages are serialized as JSON in framed envelopes (see frame.rs).
File data is streamed as raw bytes outside the framing layer.
§Message flow
Client Server
| |
|--- Handshake ----------------------->|
|<-- HandshakeAck ---------------------|
| |
|--- ArchiveRequest ------------------>|
|<-- ArchiveAccept --------------------|
|--- [FileHeader + raw chunks]* ------>|
|--- ArchiveComplete ----------------->|
| |
|--- RestoreRequest ------------------>|
|<-- RestoreAccept --------------------|
|<-- [FileHeader + raw chunks]* -------|
|<-- RestoreComplete ------------------|
| |
|--- StatusRequest ------------------->|
|<-- StatusResponse -------------------|Structs§
- Archive
Accept - Server accepts the archive request and assigns a session.
- Archive
Complete - Client reports the final outcome of the archive transfer.
- Archive
Request - Client requests permission to upload a project archive.
- Error
Message - Generic error response sent by either party on protocol violations, authentication failures, or storage errors.
- FileEnd
- Sent after a file’s content has been fully streamed.
- File
Header - Metadata for a single file within a project archive.
- Handshake
- Sent by the client immediately after the TLS handshake completes.
- Handshake
Ack - Server response to a Handshake message.
- Project
Info - Summary information about a stored project.
- Restore
Accept - Server accepts the restore request and provides metadata.
- Restore
Complete - Server reports the restore transfer is complete.
- Restore
Request - Client requests a project archive be sent back for restore.
- Status
Request - Request project information from the server. An empty request returns all projects; provide a UUID to query one.
- Status
Response - Server response with matching project information.
Enums§
- Client
Message - All messages a client can send to the server.
- Message
Type - Identifies the type of a protocol message in the frame header.
- Server
Message - All messages a server can send to the client.
Constants§
- CHUNK_
SIZE - Default chunk size for file streaming: 1 MiB.
- PROTOCOL_
VERSION - Protocol version constant. Both client and server must agree on this.
Functions§
- build_
archive_ accept - Build an ArchiveAccept server message.
- build_
archive_ complete - Build a successful ArchiveComplete message.
- build_
archive_ failed - Build a failed ArchiveComplete message.
- build_
archive_ request - Build an ArchiveRequest message for the given project metadata.
- build_
error - Build an Error server message.
- build_
handshake_ ack_ failed - Build a HandshakeAck for failed authentication.
- build_
handshake_ ack_ success - Build a HandshakeAck for successful authentication.
- build_
restore_ accept - Build a RestoreAccept server response with session and metadata.
- build_
restore_ complete - Build a successful RestoreComplete message.
- build_
restore_ failed - Build a failed RestoreComplete message.
- build_
restore_ request - Build a RestoreRequest for a project UUID.
- build_
status_ response - Build a StatusResponse with project listings.
- decode_
client_ message - Deserialize a client message from raw frame payload bytes.
- decode_
server_ message - Deserialize a server message from raw frame payload bytes.