You cannot create your own Ping class using Sockets, since Mango sockets do not support custom IP headers.
You can create your own ping service, which will basically be the same as ping with only TCP or UDP packets and user data in packets. But then your endpoint should provide your own server implementation.
source share