Options
All
  • Public
  • Public/Protected
  • All
Menu

@ndn/rdr

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

This package implements Realtime Data Retrieval (RDR) protocol.

Index

References

Metadata

Re-exports Metadata

MetadataKeyword

Re-exports MetadataKeyword

decodeMetadataContent

Re-exports decodeMetadataContent

encodeMetadataContent

Re-exports encodeMetadataContent

isDiscoveryInterest

Re-exports isDiscoveryInterest

makeDiscoveryInterest

Re-exports makeDiscoveryInterest

makeMetadataPacket

Re-exports makeMetadataPacket

retrieveMetadata

Re-exports retrieveMetadata

serveMetadata

Re-exports serveMetadata

Variables

Const MetadataKeyword

MetadataKeyword: Component = Keyword.create("metadata")

32=metadata component.

Const retrieveMetadata

retrieveMetadata: (prefix: NameLike, opts?: Options) => PCancelable<Metadata> = PCancelable.fn(async (prefix: NameLike, arg2: any, arg3: any) => {const [{endpoint = new Endpoint(),retx,verifier,}, onCancel]: [Options, PCancelable.OnCancelFunction] =typeof arg2 === "function" ? [{}, arg2] : [arg2, arg3];const interest = makeDiscoveryInterest(prefix);const consumer = endpoint.consume(interest, {retx,describe: `RDR-c(${prefix})`,});onCancel(() => consumer.cancel());const data = await consumer;if (verifier) {await verifier.verify(data);}return decodeMetadataContent(data.content);})

Retrieve RDR metadata packet.

Type declaration

Functions

decodeMetadataContent

  • decodeMetadataContent(wire: Uint8Array): Metadata

encodeMetadataContent

  • encodeMetadataContent(__namedParameters: { name: Name }): Uint8Array
  • Encode RDR metadata packet content.

    Parameters

    • __namedParameters: { name: Name }
      • name: Name

    Returns Uint8Array

isDiscoveryInterest

  • isDiscoveryInterest(__namedParameters: { canBePrefix: boolean; mustBeFresh: boolean; name: Name }): boolean
  • Determine if an Interest is an RDR discovery Interest.

    Parameters

    • __namedParameters: { canBePrefix: boolean; mustBeFresh: boolean; name: Name }
      • canBePrefix: boolean
      • mustBeFresh: boolean
      • name: Name

    Returns boolean

makeDiscoveryInterest

  • makeDiscoveryInterest(prefix: NameLike): Interest

makeMetadataPacket

  • makeMetadataPacket(m: Metadata, __namedParameters?: { freshnessPeriod: number; prefix: undefined | string | Name; signer: Signer }): Promise<Data>
  • Make RDR metadata packet.

    Parameters

    • m: Metadata
    • Default value __namedParameters: { freshnessPeriod: number; prefix: undefined | string | Name; signer: Signer } = {}
      • freshnessPeriod: number
      • prefix: undefined | string | Name
      • signer: Signer

    Returns Promise<Data>

makeName

serveMetadata

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