This package is part of NDNts, Named Data Networking libraries for the modern web.
This package implements Endpoint type, which is the basic abstraction through which an application can communicate with the NDN network.
An endpoint is similar to a "client face" in other NDN libraries, with the enhancement that it handles these details automatically:
Data will be sent automatically upon Interest arrival.
Progress of Data retrieval.
This is a Promise that resolves with the retrieved Data, and rejects upon timeout. Calling .cancel() cancels Data retrieval and rejects the Promise.
Producer handler function.
The handler can return a Data to respond to the Interest, or return 'false' 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 'false', the Interest is used to query the DataBuffer, and any matching Data may be sent.
A function to generate retx intervals.
Interest retransmission policy.
A number is interpreted as the limit. Set 0 to disable retransmissions.
Generated using TypeDoc