Documentation ¶
Index ¶
- type Peer
- func (*Peer) CloseConn() error
- func (mp *Peer) FlushStop()
- func (mp *Peer) Get(key string) any
- func (*Peer) GetRemovalFailed() bool
- func (mp *Peer) ID() p2p.ID
- func (mp *Peer) IsOutbound() bool
- func (mp *Peer) IsPersistent() bool
- func (mp *Peer) NodeInfo() p2p.NodeInfo
- func (mp *Peer) RemoteAddr() net.Addr
- func (mp *Peer) RemoteIP() net.IP
- func (*Peer) Send(_ p2p.Envelope) bool
- func (mp *Peer) Set(key string, value any)
- func (*Peer) SetRemovalFailed()
- func (mp *Peer) SocketAddr() *p2p.NetAddress
- func (*Peer) Status() conn.ConnectionStatus
- func (*Peer) TrySend(_ p2p.Envelope) bool
- type Reactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { *service.BaseService Outbound, Persistent bool // contains filtered or unexported fields }
func NewPeer ¶
NewPeer creates and starts a new mock peer. If the ip is nil, random routable address is used.
func (*Peer) GetRemovalFailed ¶
func (*Peer) IsOutbound ¶
func (*Peer) IsPersistent ¶
func (*Peer) RemoteAddr ¶
func (*Peer) SetRemovalFailed ¶
func (*Peer) SetRemovalFailed()
func (*Peer) SocketAddr ¶
func (mp *Peer) SocketAddr() *p2p.NetAddress
func (*Peer) Status ¶
func (*Peer) Status() conn.ConnectionStatus
type Reactor ¶
type Reactor struct { p2p.BaseReactor Channels []*conn.ChannelDescriptor }
func NewReactor ¶
func NewReactor() *Reactor
func (*Reactor) GetChannels ¶
func (r *Reactor) GetChannels() []*conn.ChannelDescriptor
Click to show internal directories.
Click to hide internal directories.