The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/p2p/host.go

14 lines
278 B

package p2p
import "github.com/libp2p/go-libp2p-peer"
// Host is the client + server in p2p network.
type Host interface {
GetSelfPeer() Peer
SendMessage(Peer, []byte) error
BindHandlerAndServe(handler StreamHandler)
Close() error
AddPeer(*Peer) error
GetID() peer.ID
}