Interface ClientOptions

Client options.

interface ClientOptions {
    acceptContentType?: readonly number[];
    cOpts?: ConsumerOptions;
    ca?: CongestionAvoidance;
    describe?: string;
    endpoint?: Endpoint;
    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 full)

Properties

acceptContentType?: readonly number[]

List of acceptable ContentType values.

Default Value

[0]

Inherit fetcher options from consumer options.

Remarks

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

  • describe
  • fw
  • modifyInterest
  • signal
  • verifier

Other options cannot be inherited, notably:

  • retx

Use given congestion avoidance instance.

describe?: string

Description for debugging purpose.

Default Value

"consume" + Interest name.
endpoint?: Endpoint

Inherit fetcher options from Endpoint consumer options.

Deprecated

Specify .cOpts.

estimatedFinalSegNum?: number

Estimated final segment number (inclusive).

Remarks

If specified, FetchLogic sends Interests up to this segment number initially as permitted by congestion control, then sends further Interests in a stop-and-wait manner, unless a new estimation or known finalSegNum is provided via setFinalSegNum() function.

Logical forwarder instance.

Default Value

Forwarder.getDefault()

lifetimeAfterRto?: number

InterestLifetime added to RTO.

Default Value

1000ms
modifyInterest?: Modify

Modify Interest according to specified options.

Default Value

undefined, no modification.

retx?: RetxPolicy

Retransmission policy.

Default Value

undefined, no retransmission.

retxLimit?: number

Maximum number of retransmissions, excluding initial Interest.

Default Value

15
rtte?: RttEstimator | Partial<Parameters>

Use given RttEstimator instance or construct RttEstimator from options.

segmentNumConvention?: SegmentConvention

Choose a segment number naming convention.

Default Value

Segment3

segmentRange?: [number, undefined | number]

Specify segment number range as [begin, end).

Remarks

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 canceling the Interest via AbortController.

verifier?: Verifier

Data verifier.

Default Value

undefined, no verification.