Interface FwFace

A socket or network interface associated with logical forwarder.

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

Hierarchy

  • TypedEventTarget<EventMap>
    • FwFace

Properties

addAnnouncement: ((name: NameLike) => void)

Add a prefix announcement associated with the face.

Type declaration

    • (name): void
    • Parameters

      • name: NameLike

        Prefix announcement name.

      Returns void

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: NameLike, announcement?: FwFace.RouteAnnouncement) => void)

Add a route toward the face.

Type declaration

    • (name, announcement?): void
    • Parameters

      Returns void

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.

hasRoute: ((name: NameLike) => boolean)

Determine if a route is present on the face.

removeAnnouncement: ((name: NameLike) => void)

Remove a prefix announcement associated with the face.

removeRoute: ((name: NameLike, announcement?: FwFace.RouteAnnouncement) => void)

Remove a route toward the face.

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

Returns a string representation of an object.