Class Net::Ping::TCP
In: lib/net/ping/tcp.rb
Parent: Ping

With a TCP ping simply try to open a connection. If we are successful, assume success. In either case close the connection to be polite.

Methods

External Aliases

service_check -> econnrefused
service_check= -> econnrefused=
service_check -> ecr
service_check= -> ecr=

Public Class methods

Returns whether or not Errno::ECONNREFUSED is considered a successful ping. The default is false.

Sets whether or not an Errno::ECONNREFUSED should be considered a successful ping.

Public Instance methods

This method attempts to ping a host and port using a TCPSocket with the host, port and timeout values passed in the constructor. Returns true if successful, or false otherwise.

Note that, by default, an Errno::ECONNREFUSED return result will be considered a failed ping. See the documentation for the Ping::TCP.service_check= method if you wish to change this behavior.

ping?(host=@host)

Alias for ping

pingecho(host=@host)

Alias for ping

[Validate]