Class Net::Ping::ICMP
In: lib/net/ping/icmp.rb
Parent: Ping

The Net::Ping::ICMP class encapsulates an icmp ping.

Methods

bind   data_size=   new   ping   ping?   pingecho  

Constants

ICMP_ECHOREPLY = 0
ICMP_ECHO = 8
ICMP_SUBCODE = 0

Attributes

data_size  [R]  Returns the data size, i.e. number of bytes sent on the ping. The default size is 56.

Public Class methods

Creates and returns a new Ping::ICMP object. This is similar to its superclass constructor, but must be created with root privileges (on UNIX systems), and the port value is ignored.

Public Instance methods

Associates the local end of the socket connection with the given host and port. The default port is 0.

Sets the number of bytes sent in the ping method.

Pings the host specified in this method or in the constructor. If a host was not specified either here or in the constructor, an ArgumentError is raised.

ping?(host = @host)

Alias for ping

pingecho(host = @host)

Alias for ping

[Validate]