Basic ping implementation in iOS