Interface ClientOptions

Client options.

interface ClientOptions {
    acceptContentType?: readonly number[];
    ca?: CongestionAvoidance;
    cOpts?: ConsumerOptions;
    describe?: string;
    estimatedFinalSegNum?: number;
    fw?: Forwarder;
    lifetimeAfterRto?: number;
    modifyInterest?: Modify;
    retx?: RetxPolicy;
    retxLimit?: number;
    rtte?: RttEstimator | Partial<Parameters>;
    segmentNumConvention?: SegmentConvention;
    segmentRange?: [number, undefined | number];
    signal?: AbortSignal;
    verifier?: Verifier;
}

Hierarchy (View Summary)

Properties

acceptContentType?: readonly number[]

List of acceptable ContentType values.

[0]

Use given congestion avoidance instance.

Inherit fetcher options from consumer options.

These options are inherited if the corresponding fetcher option is unset:

  • describe
  • fw
  • modifyInterest
  • signal
  • verifier

Other options cannot be inherited, notably:

  • retx
describe?: string

Description for debugging purpose.

In a consumer, "consume" + Interest name. In a producer, "produce" + main prefix.

estimatedFinalSegNum?: number

Estimated final segment number (inclusive).

This option has no effect at the moment.

Logical forwarder instance.

Forwarder.getDefault()

lifetimeAfterRto?: number

InterestLifetime added to RTO.

1000ms

modifyInterest?: Modify

Modify Interest according to specified options.

undefined, no modification.

retx?: RetxPolicy

Retransmission policy.

undefined, no retransmission.

retxLimit?: number

Maximum number of retransmissions, excluding initial Interest.

15

rtte?: RttEstimator | Partial<Parameters>

Use given RttEstimator instance or construct RttEstimator from options.

segmentNumConvention?: SegmentConvention

Choose a segment number naming convention.

Segment3

segmentRange?: [number, undefined | number]

Specify segment number range as [begin, end).

The begin segment number is inclusive and the end segment number is exclusive. If the begin segment number is greater than the final segment number, fetching will fail. If the end segment number is undefined or greater than the final segment number, fetching will stop at the final segment.

signal?: AbortSignal

AbortSignal that allows cancellation via AbortController.

In a consumer, the promise returned by consume() is rejected. In a producer, the producer is closed.

verifier?: Verifier

Data verifier.

undefined, no verification.