Creates a task that establishes a bidirectional TCP/IP connection to a specified hostname and port.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The hostname of the connection endpoint.
The port of the connection endpoint.
The new session stream task.
After you create the task, you must start it by calling its
Adding Stream Tasks to a Session
A protocol defining methods that URL session instances call on their delegates to handle task-level events specific to stream tasks.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software