Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @ndn/endpoint

Index

Type aliases

ProducerHandler

ProducerHandler: (interest: Interest, producer: Producer) => Promise<Data | undefined>

Type declaration

    • (interest: Interest, producer: Producer): Promise<Data | undefined>
    • Producer handler function.

      The handler can return a Data to respond to the Interest, or return undefined to cause a timeout.

      If Options.dataBuffer is provided, the handler can access the DataBuffer via producer.dataBuffer . The handler can return a Data to respond to the Interest, which is also inserted to the DataBuffer unless Options.autoBuffer is set to false. If the handler returns undefined, the Interest is used to query the DataBuffer, and any matching Data may be sent.

      Parameters

      Returns Promise<Data | undefined>

RetxPolicy

RetxPolicy: RetxOptions | RetxGenerator | number

Interest retransmission policy.

A number is interpreted as the limit. Set 0 to disable retransmissions.

Generated using TypeDoc