Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrStringToPeerInfo ¶
Types ¶
type ExtendedHost ¶
type ExtendedHost struct { Host host.Host Protocol []Protocol }
func SetProtocol ¶
func SetProtocol(host host.Host, proto []Protocol) *ExtendedHost
func (*ExtendedHost) AddPeer ¶
func (eh *ExtendedHost) AddPeer(info peerstore.PeerInfo) error
func (*ExtendedHost) AddPeerWithAddr ¶
func (eh *ExtendedHost) AddPeerWithAddr(addr string) error
func (*ExtendedHost) GetCompleteAddr ¶
func (eh *ExtendedHost) GetCompleteAddr() string
type Protocol ¶
type Protocol struct { Name string Version uint Run StreamHandler }
type StreamHandler ¶
type StreamHandler func(stream net.Stream, initiator bool)
Click to show internal directories.
Click to hide internal directories.