ping

package
v0.12.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: ISC Imports: 9 Imported by: 1

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