connect abstract method

Future<void> connect(
  1. AddrInfo pi, {
  2. Context? context,
})

Connect ensures there is a connection between this host and the peer with given peer.ID. Connect will absorb the addresses in pi into its internal peerstore. If there is not an active connection, Connect will issue a h.Network.Dial, and block until a connection is open, or an error is returned.

If context is not provided, a new Context will be created.

Implementation

Future<void> connect(AddrInfo pi, {Context? context});