A URL session task that is stream-based.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
NSURLSession class provides an interface a TCP/IP connection created via
NSURLSession. Tasks may be created from an
NSURLSession using the
stream methods. They may also created as a result of an
NSURLSession being upgraded via the HTTP
Upgrade: response header and appropriate use of the
HTTPShould option of
NSURLSession object perform sasynchronous reads and writes, which are enqueued and executed serially, calling a handler upon completion being on the session delegate queue. If the task is canceled, all enqueued reads and writes will call their completion handlers with an appropriate error.