Instance Method

streamTaskWithNetService:

Creates a task that establishes a bidirectional TCP/IP connection using a specified network service.

Declaration

- (NSURLSessionStreamTask *)streamTaskWithNetService:(NSNetService *)service;

Parameters

service

An NSNetService 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.

See Also

Adding Stream Tasks to a Session

- streamTaskWithHostName:port:

Creates a task that establishes a bidirectional TCP/IP connection to a specified hostname and port.

NSURLSessionStreamTask

A URL session task that is stream-based.

NSURLSessionStreamDelegate

A protocol defining methods that URL session instances call on their delegates to handle task-level events specific to stream tasks.

Beta Software

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