Documentation ¶
Index ¶
- type Bootstrap
- type Broadcast
- func (b *Broadcast) Broadcast(msg interface{})
- func (b *Broadcast) PeerConnect(s libp2p.Session)
- func (b *Broadcast) PeerDisconnect(s libp2p.Session)
- func (b *Broadcast) RandSend(msg interface{}) error
- func (b *Broadcast) RecInternalMsg(msg libp2p.InterMsg) error
- func (b *Broadcast) Startup(net libp2p.Network)
- type DiscoveryPlugin
- type Find
- type NatTraversal
- type Nodes
- type Ping
- type Pong
- type SingleConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcast ¶
Broadcast broadcast message to all connection
func (*Broadcast) Broadcast ¶
func (b *Broadcast) Broadcast(msg interface{})
Broadcast Broadcast message
func (*Broadcast) PeerConnect ¶
PeerConnect is called every time a Session is initialized and connected
func (*Broadcast) PeerDisconnect ¶
PeerDisconnect is called every time a Session connection is closed
func (*Broadcast) RecInternalMsg ¶
RecInternalMsg internal msg
type DiscoveryPlugin ¶
DiscoveryPlugin discovery plugin of dht
func (*DiscoveryPlugin) PeerConnect ¶
func (d *DiscoveryPlugin) PeerConnect(s libp2p.Session)
PeerConnect is called every time a PeerSession is initialized and connected
func (*DiscoveryPlugin) PeerDisconnect ¶
func (d *DiscoveryPlugin) PeerDisconnect(s libp2p.Session)
PeerDisconnect is called every time a PeerSession connection is closed
func (*DiscoveryPlugin) Receive ¶
func (d *DiscoveryPlugin) Receive(e libp2p.Event) error
Receive is called every time when messages are received
func (*DiscoveryPlugin) Startup ¶
func (d *DiscoveryPlugin) Startup(net libp2p.Network)
Startup is called only once when the plugin is loaded
type NatTraversal ¶
NatTraversal try nat traversal by proxy node
type SingleConn ¶ added in v0.2.10
SingleConn limit one connection pre user
func (*SingleConn) PeerConnect ¶ added in v0.2.10
func (p *SingleConn) PeerConnect(s libp2p.Session)
PeerConnect PeerConnect
func (*SingleConn) PeerDisconnect ¶ added in v0.2.10
func (p *SingleConn) PeerDisconnect(s libp2p.Session)
PeerDisconnect PeerDisconnect
func (*SingleConn) Startup ¶ added in v0.2.10
func (p *SingleConn) Startup(net libp2p.Network)
Startup Startup