mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-04-02 13:50:11 +08:00
changes as per review
This commit is contained in:
parent
3ff44e3770
commit
22092abdbb
@ -1,13 +1,16 @@
|
|||||||
package event
|
package event
|
||||||
|
|
||||||
import "github.com/libp2p/go-libp2p-core/network"
|
import (
|
||||||
|
"github.com/libp2p/go-libp2p-core/network"
|
||||||
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
|
)
|
||||||
|
|
||||||
// EvtPeerStateChange should be emitted everytime we form a connection with a peer or drop our last
|
// EvtPeerConnectednessChange should be emitted every time we form a connection with a peer or drop our last
|
||||||
// connection with the peer. Essentially, it is emitted in two cases:
|
// connection with the peer. Essentially, it is emitted in two cases:
|
||||||
// a) We form a/any connection with a peer.
|
// a) We form a/any connection with a peer.
|
||||||
// b) We go from having a connection/s with a peer to having no connection with the peer.
|
// b) We go from having a connection/s with a peer to having no connection with the peer.
|
||||||
// It contains the connection handle and the new connection state.
|
// It contains the Id of the remote peer and the new connectedness state.
|
||||||
type EvtPeerStateChange struct {
|
type EvtPeerConnectednessChange struct {
|
||||||
Connection network.Conn
|
RemotePeerId peer.ID
|
||||||
NewState network.Connectedness
|
Connectedness network.Connectedness
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user