Interface Producer

A running producer.

interface Producer {
    close: (() => void);
    dataBuffer?: DataBuffer;
    face: FwFace;
    prefix: undefined | Name;
    processInterest: ((interest: Interest) => Promise<undefined | Data>);
}

Hierarchy

  • Disposable
    • Producer

Properties

close: (() => void)

Close the producer.

dataBuffer?: DataBuffer

Outgoing Data buffer.

face: FwFace

Logical forwarder face for this producer.

prefix: undefined | Name

Prefix specified in produce call. Additional prefixes can be added via .face.addRoute().

processInterest: ((interest: Interest) => Promise<undefined | Data>)

Process an Interest received elsewhere.

Use case of this function:

  1. Producer A dynamically creates producer B upon receiving an Interest.
  2. Producer A can invoke this function to let producer B generate a response.
  3. The response should be sent by producer A.