There are a few reasons ICMP is not the way to go:

* ICMP is not reliable because some hosts deliberately block ICMP
traffic to stop the ping of death
[http://en.wikipedia.org/wiki/Ping_of_death].
* It is a different port and protocol than you probably want to
communicate on.  So reaching (or not reaching) a host via ICMP does
not guarantee you can make a normal socket connection (and vice
versa).
* ICMP is normally blocked from behind firewalls.

The best approach, as has already been stated, is to make the request
and handle the failed attempt gracefully.

Mark

On Tue, Nov 24, 2009 at 10:13 AM, Julio Cesar Ody <[email protected]> wrote:
> And I looked in the Net namespace and couldn't find anything  *sad face*
>
> Thanks!
>
> ps: reiterating, ICMP is what you're looking for if the purpose of the
> test is to verify if a host can be reached.
>
>
>
> On Tue, Nov 24, 2009 at 10:06 AM, Ryan Bigg <[email protected]> wrote:
>> Ruby has this built
>> in: http://ruby-doc.org/stdlib/libdoc/ping/rdoc/index.html
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Ruby or Rails Oceania" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/rails-oceania?hl=.
>>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rails-oceania?hl=.
>
>
>



-- 
Mark Mansour
[email protected]
http://agilebench.com/

--

You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=.


Reply via email to