Protocol

NSURLSessionStreamDelegate

The NSURLSessionStreamDelegate protocol defines delegate methods that you should implement when using NSURLSession stream tasks.

Overview

In addition to these methods, be sure to implement the methods in the NSURLSessionTaskDelegate and NSURLSessionDelegate protocols to handle events common to all task types and session-level events, respectively.

Topics

Delegate Methods

URLSession:readClosedForStreamTask:

Tells the delegate that the read side of the underlying socket has been closed.

URLSession:writeClosedForStreamTask:

Tells the delegate that the write side of the underlying socket has been closed.

URLSession:betterRouteDiscoveredForStreamTask:

Tells the delegate that a better route to the host has been detected for the stream.

URLSession:streamTask:didBecomeInputStream:outputStream:

Tells the delegate that the stream task has been completed as a result of the stream task calling the captureStreams method.

Relationships

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.

streamTaskWithNetService:

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

NSURLSessionStreamTask

A URL session task that is stream-based.