ping in monotouch
I'm wondering why does some monotouch features works well in simulator but fails on real device? the same Ping class. it works perfectly from simulator but fails on the device. What is the difference? it there a way to make it work on device?
More over, I've found this article on how to implement ping in mac OS: http://developer.apple.com/library/mac/#samplecode/SimplePing/Listings/SimplePing_m.html#//apple_ref/doc/uid/DTS10000716-SimplePing_m-DontLinkElementID_5
will it be possible to port this code to monotouch? being honest, I havent yet tried if it works on iOS, but I dont see anything why wouldn't it work there.
PS. I know about Reachability class, and yes, I do use it in my projects instead of ping!
This is most likely an issue with what iOS allows you to do.
Here is from one guy who tried to implement ping using raw sockets, and ran into iOS restrictions.
The original bugreport states that: "To do a ping requires a linux kernel capability (capget) or the ping binary on the device which doesn't exist." In other words: root access.
Here is a workaround, but it's not a ping implementation.
That said, it looks like somebody tried to port the SimplePing sample to iOS with success, so maybe it is possible after all - but it just hasn't been a priority to look into it (the Reachability class is after all available).