A Connection is a high-level representation of a connection to a remote peer that may have been secured by encryption and multiplexed, depending on the configuration of the nodes between which the connection is made.

Hierarchy

  • Connection

Properties

addStream: ((stream: Stream) => void)

Type declaration

    • (stream: Stream): void
    • Parameters

      Returns void

close: (() => Promise<void>)

Type declaration

id: string
newStream: ((multicodecs: string | string[], options?: NewStreamOptions) => Promise<Stream>)

Type declaration

remoteAddr: Multiaddr
remotePeer: PeerId
removeStream: ((id: string) => void)

Type declaration

    • (id: string): void
    • Parameters

      • id: string

      Returns void

streams: Stream[]
tags: string[]