Contents

cancel(reason:)

Cancels a session, discarding any unsent messages.

Declaration

func cancel(reason: String)

Parameters

  • reason:

    A description that explains why cancellation occured.

Discussion

When you cancel a session, it discards any unsent messages and invalidates its connection. If there are messages awaiting replies, the session calls the reply handlers with an appropriate XPCRichError.

See Also

Managing the life cycle