Documentation ¶
Overview ¶
Package ping allows sending ICMP echo requests to a host in order to determine network latency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListenPacketer ¶ added in v1.42.0
type ListenPacketer interface {
ListenPacket(ctx context.Context, typ string, addr string) (net.PacketConn, error)
}
PacketListener defines the interface required to listen to packages on an address.
type Pinger ¶
Pinger represents a set of ICMP echo requests to be sent at a single time.
A new instance should be created for each concurrent set of ping requests; this type should not be reused.
func New ¶
New creates a new Pinger. The Context provided will be used to create network listeners, and to set an absolute deadline (if any) on the net.Conn
Click to show internal directories.
Click to hide internal directories.