RTCForge API Reference v1.1.1
    Preparing search index...

    Interface FileTransferOptions

    Options accepted by the FileTransferManager constructor.

    interface FileTransferOptions {
        checksum?: boolean;
        chunkSize?: number;
        highWaterMark?: number;
        lowWaterMark?: number;
        maxFileSize?: number;
        offerTimeoutMs?: number;
        parallelChannels?: number;
        resumable?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    checksum?: boolean

    Whether to compute and verify a SHA-256 checksum over the file.

    true

    chunkSize?: number

    Payload bytes per chunk (excluding the frame header).

    DEFAULT_CHUNK_SIZE

    highWaterMark?: number

    Data-channel bufferedAmount (bytes) at which the sender pauses to apply backpressure.

    lowWaterMark?: number

    bufferedAmountLowThreshold (bytes) at which the paused sender resumes.

    maxFileSize?: number

    Upper bound (bytes) on an inbound offer's declared file size. Offers larger than this are auto-rejected before a ReceiveTransfer is created, blunting memory/disk-exhaustion from a hostile size. Omit for no limit.

    unlimited
    
    offerTimeoutMs?: number

    Milliseconds a sender waits for the receiver to accept an offer before the transfer fails (releasing its open channels). 0 disables the timeout.

    DEFAULT_OFFER_TIMEOUT_MS

    parallelChannels?: number

    Number of parallel binary data channels opened per transfer; chunks are striped across them.

    resumable?: boolean

    When true, a mid-transfer data-channel drop pauses the send instead of failing it; re-announcing on reconnected channels (FileTransferManager.resumeSend) resends only the chunks the receiver is still missing. In-session only (state is not persisted across reloads), and best used with checksum: false.

    false