Sends a ping frame from the client side, with a closure to receive the pong from the server endpoint.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
A block called by the task when it receives the pong from the server. The block receives an
NSErrorthat indicates a lost connection or other error, or
nilif no error cocured.
When sending multiple pings, the task always calls
pong in the order it sent the pings.