Instance Method

invalidateAndCancel

Cancels all outstanding tasks and then invalidates the session.

Declaration

- (void)invalidateAndCancel;

Discussion

Once invalidated, references to the delegate and callback objects are broken. After invalidation, session objects cannot be reused.

To allow outstanding tasks to run until completion, call finishTasksAndInvalidate instead.

See Also

Managing the Session

- finishTasksAndInvalidate

Invalidates the session, allowing any outstanding tasks to finish.

- flushWithCompletionHandler:

Flushes cookies and credentials to disk, clears transient caches, and ensures that future requests occur on a new TCP connection.

- getTasksWithCompletionHandler:

Asynchronously calls a completion callback with all data, upload, and download tasks in a session.

- getAllTasksWithCompletionHandler:

Asynchronously calls a completion callback with all tasks in a session

- resetWithCompletionHandler:

Empties all cookies, caches and credential stores, removes disk files, flushes in-progress downloads to disk, and ensures that future requests occur on a new socket.

sessionDescription

An app-defined descriptive label for the session.