Documentation
¶
Index ¶
Constants ¶
View Source
const (
KeepaliveMessageLen = 9
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keepalive ¶
Keepalive defines a message which gets exchanged between two peers
func (*Keepalive) MarshalBinary ¶
func (*Keepalive) UnmarshalBinary ¶
type KeepaliveStats ¶
type Monitor ¶
type Monitor interface { // GetPeerState(string) PeerState GetMonitorCh() chan *MonitorMessage Stop() }
func SetupMonitorForRemotePeer ¶
SetupMonitorForRemotePeer sets up a keep alive mechanism between a local and remote peers, returned Monitor interface allows get a state of a particular peer by specifying its id, or get a notification channel for changes of a remote peer states.
type MonitorMessage ¶
type Peer ¶
type Peer interface { Start() Stop() GetSessionStateChangeCh() chan *SessionState GetRemoteAddr() string Alive() bool }
Manager defines methods to control and query a keepalive process
type SessionState ¶
Click to show internal directories.
Click to hide internal directories.