Module topology/index

Index

Classes

Type aliases

Type aliases

Connection

Connection: Connection

Handlers

Handlers: { onConnect?: ((peerId: PeerId, conn: Connection) => void) | undefined; onDisconnect?: ((peerId: PeerId, error?: Error | undefined) => void) | undefined }

Type declaration

  • Optional onConnect?: ((peerId: PeerId, conn: Connection) => void) | undefined
    • protocol "onConnect" handler
  • Optional onDisconnect?: ((peerId: PeerId, error?: Error | undefined) => void) | undefined
    • protocol "onDisconnect" handler

Options

Options: { handlers?: Handlers | undefined; max?: number | undefined; min?: number | undefined }

Type declaration

  • Optional handlers?: Handlers | undefined
  • Optional max?: number | undefined
    • maximum needed connections.
  • Optional min?: number | undefined
    • minimum needed connections.

PeerId

PeerId: PeerId