Thin wrapper around a peer's inbound / outbound pubsub streams

Hierarchy (view full)

Constructors

Properties

#private: any
_inboundAbortController: AbortController

An AbortController for controlled shutdown of the inbound stream

_rawInboundStream?: Stream

The raw inbound stream, as retrieved from the callback from libp2p.handle

_rawOutboundStream?: Stream

The raw outbound stream, as retrieved from conn.newStream

closed: boolean
id: PeerId
inboundStream?: AsyncIterable<Uint8ArrayList>

Read stream

log: Logger
outboundStream?: Pushable<Uint8ArrayList, void, unknown>

Write stream - it's preferable to use the write method

protocol: string

Accessors

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

  • Parameters

    • type: string

    Returns number