Add p2p documentation

This commit is contained in:
Arnaud 2025-10-09 08:29:48 +02:00
parent 9fceeac33f
commit e0ee7f707a
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F

View File

@ -220,6 +220,16 @@ err := node.Fetch(cid)
The `Fetch` method download remote data into your local node.
### P2P
You can connect to a node using the `peerId` or the `listenAddresses`:
```go
peerId := "..."
addrs := ["..."]
err := node1.Connect(peerId, addrs)
```
### Debug
Several methods are available to debug your node: