Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICMP4Pinger ¶
type ICMP4Pinger struct {
// contains filtered or unexported fields
}
func NewICMP4Pinger ¶
func NewICMP4Pinger(laddr string) (*ICMP4Pinger, error)
Returns new ICMP4Pinger. laddr is local ip address for listening.
func (*ICMP4Pinger) Ping ¶
func (i *ICMP4Pinger) Ping(raddr string) (Pong, error)
Send Echo-Request to remote host and wait Echo-Reply. raddr is an address of remote host.
func (*ICMP4Pinger) ResetCounter ¶
func (i *ICMP4Pinger) ResetCounter()
Sets ICMP4Pinger counter to 0. Counter increments with each Ping() call. Counter value is set to Seq field in Echo-Request.
func (*ICMP4Pinger) SetTimeout ¶
func (i *ICMP4Pinger) SetTimeout(d time.Duration)
Sets ICMP4Pinger timeout. Timeout is a waiting time for a Echo-Reply from a remote host.
type UDP4Pinger ¶
type UDP4Pinger struct {
// contains filtered or unexported fields
}
func NewUDP4Pinger ¶
func NewUDP4Pinger(laddr string) (*UDP4Pinger, error)
Returns new UDP4Pinger. laddr is local ip address for listening.
func (*UDP4Pinger) Ping ¶
func (i *UDP4Pinger) Ping(raddr string) (Pong, error)
Send Echo-Request to remote host and wait Echo-Reply. raddr is an address of remote host.
func (*UDP4Pinger) ResetCounter ¶
func (i *UDP4Pinger) ResetCounter()
Sets UDP4Pinger counter to 0. Counter increments with each Ping() call. Counter value is set to Seq field in Echo-Request.
func (*UDP4Pinger) SetTimeout ¶
func (i *UDP4Pinger) SetTimeout(d time.Duration)
Sets UDP4Pinger timeout. Timeout is a waiting time for a Echo-Reply from a remote host.