streamTask(with:)
Creates a task that establishes a bidirectional TCP/IP connection using a specified network service.
Declaration
func streamTask(with service: NetService) -> URLSessionStreamTaskParameters
- service:
A Netservice object used to determine the endpoint of the TCP/IP connection. This network service is resolved before any data is read or written to the resulting stream task.
Return Value
The new session stream task.
Discussion
After you create the task, you must start it by calling its resume() method.