Interface FwFace

A socket or network interface associated with logical forwarder.

interface FwFace {
    addAnnouncement: ((name) => void);
    addRoute: ((name, announcement?) => void);
    attributes: FwFace.Attributes;
    close: (() => void);
    fw: Forwarder;
    hasRoute: ((name) => boolean);
    removeAnnouncement: ((name) => void);
    removeRoute: ((name, announcement?) => void);
    running: boolean;
    toString: (() => string);
}

Hierarchy

  • TypedEventTarget<EventMap>
    • FwFace

Properties

addAnnouncement: ((name) => void)

Add a prefix announcement associated with the face.

Type declaration

    • (name): void
    • Parameters

      • name: NameLike

        Prefix announcement name.

      Returns void

Remarks

The announcement is passed to ReadvertiseDestinations (e.g. NFD prefix registration client) on the logical forwarder, so that remote forwarders would send Interests matching the prefix to the local logical forwarder.

Multiple FwFaces could make the same announcement. When the last FwFace making an announcement is closed, the announcement is withdrawn from ReadvertiseDestinations.

This function has no effect if FwFace.Attributes.advertiseFrom is set to false.

addRoute: ((name, announcement?) => void)

Add a route toward the face.

Type declaration

    • (name, announcement?): void
    • Parameters

      Returns void

Remarks

When the logical forwarder receives an Interest matching name, it may forward the Interest to this face. Unless announcement is set to false, this also invokes addAnnouncement to readvertise the name prefix to remote forwarders.

attributes: FwFace.Attributes
close: (() => void)

Shutdown the face.

Type declaration

    • (): void
    • Returns void

hasRoute: ((name) => boolean)

Determine if a route is present on the face.

Type declaration

    • (name): boolean
    • Parameters

      Returns boolean

removeAnnouncement: ((name) => void)

Remove a prefix announcement associated with the face.

Type declaration

    • (name): void
    • Parameters

      Returns void

removeRoute: ((name, announcement?) => void)

Remove a route toward the face.

Type declaration

running: boolean
toString: (() => string)

Type declaration

    • (): string
    • Returns string