MCPcopy
hub / github.com/libp2p/go-libp2p / ConnSecurity

Interface ConnSecurity

core/network/conn.go:120–132  ·  view source on GitHub ↗

ConnSecurity is the interface that one can mix into a connection interface to give it the security methods.

Source from the content-addressed store, hash-verified

118// ConnSecurity is the interface that one can mix into a connection interface to
119// give it the security methods.
120type ConnSecurity interface {
121 // LocalPeer returns our peer ID
122 LocalPeer() peer.ID
123
124 // RemotePeer returns the peer ID of the remote peer.
125 RemotePeer() peer.ID
126
127 // RemotePublicKey returns the public key of the remote peer.
128 RemotePublicKey() ic.PubKey
129
130 // ConnState returns information about the connection state.
131 ConnState() ConnectionState
132}
133
134// ConnMultiaddrs is an interface mixin for connection types that provide multiaddr
135// addresses for the endpoints.

Callers 24

TestIDsFunction · 0.65
TestPeerIDMatchFunction · 0.65
TestHandshakeSucceedsFunction · 0.65
handleConnFunction · 0.65
StartClientFunction · 0.65
testIDsFunction · 0.65
newStreamHandlerMethod · 0.65
TestKeysFunction · 0.65
TestHandshakeSucceedsFunction · 0.65
testKeysFunction · 0.65

Implementers 8

secureSessionp2p/security/noise/session.go
connp2p/security/tls/conn.go
Connp2p/security/insecure/insecure.go
connectionp2p/transport/webrtc/connection.go
connp2p/transport/quic/conn.go
mockConnp2p/net/connmgr/connmgr_test.go
Connp2p/net/swarm/swarm_conn.go
connp2p/net/mock/mock_conn.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…