Interface RxTxDuplex

A logical face with duplex RX and TX packet streams.

interface RxTxDuplex {
    addEventListener?: <K extends "up" | "down">(
        type: K,
        listener: (ev: RxTxEventMap[K]) => any,
        options?: AddEventListenerOptions,
    ) => void;
    attributes?: FwFace.Attributes;
    duplex: (
        iterable: AsyncIterable<FwPacket<L3Pkt>, any, any>,
    ) => AsyncIterable<FwPacket<L3Pkt>, any, any>;
    removeEventListener?: <K extends "up" | "down">(
        type: K,
        listener: (ev: RxTxEventMap[K]) => any,
        options?: EventListenerOptions,
    ) => void;
}

Hierarchy (View Summary)

Properties

addEventListener?: <K extends "up" | "down">(
    type: K,
    listener: (ev: RxTxEventMap[K]) => any,
    options?: AddEventListenerOptions,
) => void
attributes?: FwFace.Attributes
duplex: (
    iterable: AsyncIterable<FwPacket<L3Pkt>, any, any>,
) => AsyncIterable<FwPacket<L3Pkt>, any, any>

Duplex RX and TX streams.

Type declaration

    • (
          iterable: AsyncIterable<FwPacket<L3Pkt>, any, any>,
      ): AsyncIterable<FwPacket<L3Pkt>, any, any>
    • Parameters

      • iterable: AsyncIterable<FwPacket<L3Pkt>, any, any>

        TX packet stream sent by the logical forwarder.

      Returns AsyncIterable<FwPacket<L3Pkt>, any, any>

      RX packet stream received by the logical forwarder.

removeEventListener?: <K extends "up" | "down">(
    type: K,
    listener: (ev: RxTxEventMap[K]) => any,
    options?: EventListenerOptions,
) => void