interface PeerStreams {
    id: PeerId;
    inboundStream?: AsyncIterable<Uint8ArrayList>;
    isWritable: boolean;
    outboundStream?: Pushable<Uint8ArrayList, void, unknown>;
    protocol: string;
    addEventListener<K>(type, listener, options?): void;
    attachInboundStream(stream): AsyncIterable<Uint8ArrayList>;
    attachOutboundStream(stream): Promise<Pushable<Uint8ArrayList, void, unknown>>;
    close(): void;
    dispatchEvent(event): boolean;
    dispatchEvent(event): boolean;
    listenerCount(type): number;
    removeEventListener<K>(type, listener?, options?): void;
    removeEventListener(type, listener?, options?): void;
    safeDispatchEvent<Detail>(type, detail): boolean;
    write(buf): void;
}

Hierarchy (view full)

Properties

id: PeerId
inboundStream?: AsyncIterable<Uint8ArrayList>
isWritable: boolean
outboundStream?: Pushable<Uint8ArrayList, void, unknown>
protocol: string

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean