Class | Net::Ping::TCP |
In: |
lib/net/ping/tcp.rb
|
Parent: | Ping |
service_check | -> | econnrefused |
service_check= | -> | econnrefused= |
service_check | -> | ecr |
service_check= | -> | ecr= |
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.
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.