Causes the current endpoint to be rejected, allowing the connection to try another resolved address.


func nw_connection_cancel_current_endpoint(_ connection: nw_connection_t)


Protocols that do not have handshakes, such as UDP, do not allow connections to validate connectivity on their own. Cancelling an endpoint allows you to indicate that a certain endpoint should be rejected due to a lack of valid response. If other addresses were resolved for the remote endpoint, those will be attempted next.

See Also

Canceling Connections

func nw_connection_cancel(nw_connection_t)

Cancels the connection and gracefully disconnects any established network protocols.

func nw_connection_force_cancel(nw_connection_t)

Cancels the connection and immediately disconnects any established network protocols.