Instance Method

sendPingWithPongReceiveHandler:

Sends a ping frame from the client side, with a closure to receive the pong from the server endpoint.

Declaration

- (void)sendPingWithPongReceiveHandler:(void (^)(NSError *error))pongReceiveHandler;

Parameters

pongReceiveHandler

A block called by the task when it receives the pong from the server. The block receives an NSError that indicates a lost connection or other error, or nil if no error cocured.

Discussion

When sending multiple pings, the task always calls pongReceiveHandler in the order it sent the pings.