Producer that serves a segmented object.

interface Server {
    close: () => void;
    prefix: Name;
    processInterest: (interest: Interest) => Promise<undefined | Data>;
}

Properties

close: () => void

Stop the producer.

prefix: Name

Data prefix excluding segment number.

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

Process an Interest.

The producer handler is already attached to the logical forwarder and will respond to incoming Interests. It's usually unnecessary to call this function manually.