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

Hierarchy

Constructors

Properties

_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

outboundStream?: Pushable<Uint8ArrayList, void, unknown>

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

protocol: string

Accessors

  • get isReadable(): boolean
  • Do we have a connection to read from?

    Returns boolean

  • get isWritable(): boolean
  • Do we have a connection to write on?

    Returns boolean

Methods