Documentation ¶
Index ¶
- Variables
- type Event
- type Manager
- func (m *Manager) Close()
- func (m *Manager) GetAddress() string
- func (m *Manager) Listen(address string) error
- func (m *Manager) NewSession(address string) (libp2p.Session, error)
- func (m *Manager) RegistPlugin(p libp2p.IPlugin)
- func (m *Manager) SendInternalMsg(msg libp2p.InterMsg)
- func (m *Manager) SetConnPoolMgr(p libp2p.ConnPoolMgr)
- func (m *Manager) SetKeyMgr(key libp2p.CryptoMgr)
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ConnectionInterval int64 = 30
ConnectionInterval Limit frequent connections to the same address
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID int SignType string From []byte To []byte Time int64 Info interface{} // contains filtered or unexported fields }
Event event
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager network manager
func (*Manager) NewSession ¶
NewSession new connection
func (*Manager) RegistPlugin ¶
RegistPlugin regist plugin
func (*Manager) SendInternalMsg ¶
SendInternalMsg send internal message
func (*Manager) SetConnPoolMgr ¶
func (m *Manager) SetConnPoolMgr(p libp2p.ConnPoolMgr)
SetConnPoolMgr set manager of connection pool
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session session
func (*Session) GetPeerAddr ¶
GetPeerAddr get remote address
func (*Session) GetSelfAddr ¶
GetSelfAddr get self address
Click to show internal directories.
Click to hide internal directories.