go-libp2p
go-libp2p copied to clipboard
Add Transient as a "connectedness" state
This will let users:
- Quickly detect if the connection to a peer is transient.
- Detect transitions from transient to "full" connections (and back) via events.
Needed for https://github.com/ipfs/boxo/pull/526
Can we do?
Detect transitions from transient to "full" connections Can we do? Detect transitions from transient to "full" connections (and back) via events.
~I'm not sure if we can guarantee ordering between notifications for two different connections. The only guarantee right now is that disconnect on a connection is after connect. This behavior I believe was changed in https://github.com/libp2p/go-libp2p/pull/2373/files(and back) via events.~
Ignore this. It does work correct for hole punching.