Options
All
  • Public
  • Public/Protected
  • All
Menu

@ndn/segmented-object

This package is part of NDNts, Named Data Networking libraries for the modern web.

This package implements functions to publish and retrieve segmented objects. @ndn/cat package is a command line program that uses this package, and serves as an example.

The consumer functionality:

  • supports version discovery via CanBePrefix.
  • supports version discovery via RDR protocol (in @ndn/rdr package).
  • supports manifest.
  • allows specifying segment range.
  • supports segment numbers.
  • supports byte offsets.
  • supports multiple naming conventions.
  • has Interest pipelining, congestion control, and loss recovery.
  • verifies packets with a Verifier (fixed key or trust schema).
  • emits events as segments arrive.
  • outputs in-order data chunks as a readable stream.
  • outputs completely reassembled object via Promise.

The producer functionality:

  • takes input from Uint8Array.
  • takes input from readable streams.
  • takes input from files (filename in Node.js, Blob in browser).
  • generates segments of fixed size.
  • generates segments of available data as Interest arrives, to minimize delivery latency.
  • responds to version discovery Interests with CanBePrefix.
  • responds to RDR protocol (in @ndn/rdr package).
  • generates manifest.
  • supports segment numbers.
  • supports byte offsets.
  • supports multiple naming conventions.
  • signs packets with a Signer (fixed key or trust schema).
  • reports when all segments have been retrieved at least once.

Index

References

Namespaces

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

References

BlobChunkSource

Re-exports BlobChunkSource

BlobChunkSource

Re-exports BlobChunkSource

BlobChunkSource

Re-exports BlobChunkSource

BufferChunkSource

Re-exports BufferChunkSource

BufferChunkSource

Re-exports BufferChunkSource

BufferChunkSource

Re-exports BufferChunkSource

Chunk

Re-exports Chunk

Chunk

Re-exports Chunk

Chunk

Re-exports Chunk

ChunkOptions

Re-exports ChunkOptions

ChunkOptions

Re-exports ChunkOptions

ChunkOptions

Re-exports ChunkOptions

ChunkSource

Re-exports ChunkSource

ChunkSource

Re-exports ChunkSource

ChunkSource

Re-exports ChunkSource

CongestionAvoidance

Re-exports CongestionAvoidance

CongestionAvoidance

Re-exports CongestionAvoidance

FileChunkSource

Re-exports FileChunkSource

FileChunkSource

Re-exports FileChunkSource

FileChunkSource

Re-exports FileChunkSource

IterableChunkSource

Re-exports IterableChunkSource

IterableChunkSource

Re-exports IterableChunkSource

IterableChunkSource

Re-exports IterableChunkSource

RttEstimator

Re-exports RttEstimator

RttEstimator

Re-exports RttEstimator

ServeOptions

Re-exports ServeOptions

ServeOptions

Re-exports ServeOptions

ServeVersionedOptions

Re-exports ServeVersionedOptions

Server

Re-exports Server

Server

Re-exports Server

StreamChunkSource

Re-exports StreamChunkSource

StreamChunkSource

Re-exports StreamChunkSource

StreamChunkSource

Re-exports StreamChunkSource

TcpCubic

Re-exports TcpCubic

TcpCubic

Re-exports TcpCubic

discoverVersion

Re-exports discoverVersion

fetch

Re-exports fetch

fetch

Re-exports fetch

makeChunkSource

Re-exports makeChunkSource

makeChunkSource

Re-exports makeChunkSource

makeChunkSource

Re-exports makeChunkSource

serve

Re-exports serve

serve

Re-exports serve

serveVersioned

Re-exports serveVersioned

Type aliases

ChunkOptions

GivenVersionOptions

GivenVersionOptions: { version: ComponentLike }

Type declaration

MakeVersionOptions

MakeVersionOptions: { version?: undefined | number; versionConvention?: VersionConventionFromNumber }

Type declaration

OnDemandDataProducerOptions

OnDemandDataProducerOptions: DataProducerOptions

SegRequest

SegRequest<T>: Pick<Readonly<SegState>, "segNum" | "isRetx" | "rto"> & { interest: T }

Type parameters

  • T

SegmentConvention

SegmentConvention: NamingConvention<number>

ServeOptions

ServeOptions: Options & { endpoint?: Endpoint; producerPrefix?: Name }

Options to serve().

ServeVersionedOptions

ServeVersionedOptions: Omit<ServeOptions, "producerPrefix"> & GivenVersionOptions | MakeVersionOptions

VersionConvention

VersionConvention: NamingConvention<any>

VersionConventionFromNumber

VersionConventionFromNumber: NamingConvention<number, unknown>

Variables

Const CWND

CWND: unique symbol = Symbol("CongestionAvoidance.CWND")

Const UNBLOCK

UNBLOCK: unique symbol = Symbol("UNBLOCK")

Const defaultSegmentConvention

defaultSegmentConvention: SegmentConvention = Segment

Const defaultVersionConvention

defaultVersionConvention: VersionConventionFromNumber = Version

Const tokenLimiters

tokenLimiters: DefaultWeakMap<CongestionAvoidance, TokenLimiter> = new DefaultWeakMap<CongestionAvoidance, TokenLimiter>((ca) => {const tl = new TokenLimiter();tl.capacity = ca.cwnd;ca.on("cwndupdate", (cwnd) => tl.capacity = cwnd);return tl;})

Functions

getMaxChunkSize

getMinChunkSize

makeChunkSource

readBlobAsBuffer

  • readBlobAsBuffer(blob: Blob): Promise<ArrayBuffer>

readBlobFileReader

  • readBlobFileReader(blob: Blob): Promise<ArrayBuffer>

serve

serveVersioned

Object literals

Const defaultParameters

defaultParameters: object

alpha

alpha: number = 1 / 8

beta

beta: number = 1 / 4

initRto

initRto: number = 1000

k

k: number = 4

maxRto

maxRto: number = 60000

minRto

minRto: number = 200

Legend

  • Namespace
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Class
  • Class with type parameter
  • Enumeration

Generated using TypeDoc