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 closure called by the task when it receives the pong from the server. The closure receives an
NSErrorthat indicates a lost connection or other problem, or
nilif no error occurred.
When sending multiple pings, the task always calls
pong in the order it sent the pings.