addUserProvidedPeer

suspend fun addUserProvidedPeer(addr: String)

Adds a peer to connect to.

Normally peers are discovered automatically (using Bittorrent DHT, Peer exchange or Local discovery) but this function is useful in case when the discovery is not available for any reason (e.g. in an isolated network).

Note that peers added with this function are remembered across restarts. To forget a peer, use removeUserProvidedPeer.

Parameters

addr

address of the peer to connect to, in the "PROTOCOL/IP:PORT" format (PROTOCOL is is "tcp" or "quic"). Example: "quic/192.0.2.0:12345"