Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMsgTimeout = errors.New("msg timeout") ErrNodeOffline = errors.New("node offline") ErrPacketLost = errors.New("packet lost") )
View Source
var ( PING = metrics.PING PONG = metrics.PONG FINDNODE = metrics.FINDNODE NEIGHBORS = metrics.NEIGHBORS DEVP2P_HANDSHAKE = metrics.DEVP2P_HANDSHAKE DEVP2P_PING = metrics.DEVP2P_PING DEVP2P_PONG = metrics.DEVP2P_PONG STATUS_MSG = metrics.STATUS_MSG NEW_BLOCK_HASHES_MSG = metrics.NEW_BLOCK_HASHES_MSG TX_MSG = metrics.TX_MSG GET_BLOCK_HEADERS_MSG = metrics.GET_BLOCK_HEADERS_MSG BLOCK_HEADERS_MSG = metrics.BLOCK_HEADERS_MSG NEW_BLOCK_MSG = metrics.NEW_BLOCK_MSG )
View Source
var NetworkSpeed = 1024.0 * 400
Functions ¶
func CalculateLatency ¶
func CalculateLatency(content interface{}) float64
func CalculateSizeLatency ¶
func CalculateSizeLatency(size common.StorageSize) float64
Types ¶
type Message ¶
type Message struct { godes.Runner Type string Content interface{} From INode To INode Expiration float64 ResponseTo *Message // contains filtered or unexported fields }
func NewMessage ¶
func (*Message) GetLatency ¶
func (*Message) HasExpired ¶
Click to show internal directories.
Click to hide internal directories.