1
0
mirror of https://github.com/libp2p/go-libp2p-core.git synced 2025-04-13 15:20:49 +08:00
go-libp2p-core/pnet/protector.go
Yusef Napora c1c817c31a Godocs for core packages ()
Godocs for core packages.
2019-05-16 12:34:10 +01:00

16 lines
522 B
Go

// Package pnet provides interfaces for private networking in libp2p.
package pnet
import "net"
// Protector interface is a way for private network implementation to be transparent in
// libp2p. It is created by implementation and use by libp2p-conn to secure connections
// so they can be only established with selected number of peers.
type Protector interface {
// Wraps passed connection to protect it
Protect(net.Conn) (net.Conn, error)
// Returns key fingerprint that is safe to expose
Fingerprint() []byte
}