Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PingMessageType ¶
type PingMessageType struct { Version uint16 // version of the protocol NodeVer string // version of the node binary Node node.Info }
PingMessageType defines the data structure of the Ping message
func GetPingMessage ¶
func GetPingMessage(payload []byte) (*PingMessageType, error)
GetPingMessage deserializes the Ping Message from a list of byte
func NewPingMessage ¶
func NewPingMessage(peer p2p.Peer, isClient bool) *PingMessageType
NewPingMessage creates a new Ping message based on the p2p.Peer input
func (PingMessageType) ConstructPingMessage ¶
func (p PingMessageType) ConstructPingMessage() []byte
ConstructPingMessage contructs ping message from node to leader
func (PingMessageType) String ¶
func (p PingMessageType) String() string
Click to show internal directories.
Click to hide internal directories.