Skip to main content

Crate openrtc_file_transfer

Crate openrtc_file_transfer 

Source
Expand description

Optional file-transfer protocol over application-provided protected routes.

OpenRTC owns peer admission and the stream. This crate owns only reusable framing, resumable route frames, and bounded file IO. Consumer applications retain acceptance, destination, queue, history, billing, and notification policy.

Re-exports§

pub use capabilities::RequiredTransferCapabilities;
pub use capabilities::TransferCapabilities;
pub use capabilities::MAX_CAPABILITY_BYTES;
pub use capabilities::MAX_SAFE_FILE_BYTES;
pub use capabilities::REQUIRED_CAPABILITIES_METADATA_KEY;

Modules§

capabilities
Negotiated protocol requirements. Application stores and authorization remain with the consumer; advertised capabilities must reflect its real receiver.
flow_control
Shared pacing of application body bytes. One controller serves all bulk executors in a runtime; admission, ACKs and lifecycle control bypass it. Call acquire before starting transport I/O deadlines. Dropping the future cancels a queued slice without leaving a peer slot or timer behind.

Structs§

BodyFlow
Shared runtime controller plus the authenticated peer’s product-independent scheduling key. Application accounting remains outside this SDK.
FileTransferHeader
ReceivedFile
TransferLimits

Enums§

RoutedTransferFrame
One bounded file-transfer message sent through OpenRTC’s current-route selector. A transfer is a sequence of these frames, not one physical stream, so route promotion or replacement does not discard confirmed work.
TransferError

Constants§

DEFAULT_CHUNK_BYTES
DEFAULT_MAX_FILE_BYTES
DEFAULT_MAX_HEADER_BYTES
DEFAULT_ROUTED_CHUNK_BYTES
MAX_RECEIVER_WAIT_LEASE_MS
MAX_ROUTED_TRANSFER_ID_BYTES
RECEIVER_WAIT_METADATA_KEY
ROUTED_FRAME_MAGIC

Functions§

receive_to_directory
receive_to_directory_with_flow
sanitize_file_name
send_path
send_path_with_flow