ping

package
v0.10.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2021 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReceivePings

func ReceivePings(context ReceivePingsContext, incomingRoute *router.Route, outgoingRoute *router.Route) error

ReceivePings handles all ping messages coming through incomingRoute. This function assumes that incomingRoute will only return MsgPing.

func SendPings

func SendPings(context SendPingsContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peerpkg.Peer) error

SendPings starts sending MsgPings every pingInterval seconds to the given peer. This function assumes that incomingRoute will only return MsgPong.

Types

type ReceivePingsContext

type ReceivePingsContext interface {
}

ReceivePingsContext is the interface for the context needed for the ReceivePings flow.

type SendPingsContext

type SendPingsContext interface {
	ShutdownChan() <-chan struct{}
}

SendPingsContext is the interface for the context needed for the SendPings flow.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL