Package apple.foundation.protocol
Interface NSURLSessionStreamDelegate
-
- All Superinterfaces:
NSURLSessionDelegate,NSURLSessionTaskDelegate
public interface NSURLSessionStreamDelegate extends NSURLSessionTaskDelegate
API-Since: 9.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionDelegate
NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
NSURLSessionTaskDelegate.Block_URLSessionTaskDidReceiveChallengeCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStream, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillBeginDelayedRequestCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidURLSessionBetterRouteDiscoveredForStreamTask(@NotNull NSURLSession session, @NotNull NSURLSessionStreamTask streamTask)A notification that the system has determined that a better route to the host has been detected (eg, a wi-fi interface becoming available.) This is a hint to the delegate that it may be desirable to create a new task for subsequent work.default voidURLSessionReadClosedForStreamTask(@NotNull NSURLSession session, @NotNull NSURLSessionStreamTask streamTask)Indicates that the read side of a connection has been closed.default voidURLSessionStreamTaskDidBecomeInputStreamOutputStream(@NotNull NSURLSession session, @NotNull NSURLSessionStreamTask streamTask, @NotNull NSInputStream inputStream, @NotNull NSOutputStream outputStream)The given task has been completed, and unopened NSInputStream and NSOutputStream objects are created from the underlying network connection.default voidURLSessionWriteClosedForStreamTask(@NotNull NSURLSession session, @NotNull NSURLSessionStreamTask streamTask)Indicates that the write side of a connection has been closed.-
Methods inherited from interface apple.foundation.protocol.NSURLSessionDelegate
URLSessionDidBecomeInvalidWithError, URLSessionDidFinishEventsForBackgroundURLSession, URLSessionDidReceiveChallengeCompletionHandler
-
Methods inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
URLSessionDidCreateTask, URLSessionTaskDidCompleteWithError, URLSessionTaskDidFinishCollectingMetrics, URLSessionTaskDidReceiveChallengeCompletionHandler, URLSessionTaskDidReceiveInformationalResponse, URLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSend, URLSessionTaskIsWaitingForConnectivity, URLSessionTaskNeedNewBodyStream, URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, URLSessionTaskWillBeginDelayedRequestCompletionHandler, URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
-
-
Method Detail
-
URLSessionBetterRouteDiscoveredForStreamTask
default void URLSessionBetterRouteDiscoveredForStreamTask(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionStreamTask streamTask)A notification that the system has determined that a better route to the host has been detected (eg, a wi-fi interface becoming available.) This is a hint to the delegate that it may be desirable to create a new task for subsequent work. Note that there is no guarantee that the future task will be able to connect to the host, so callers should should be prepared for failure of reads and writes over any new interface.
-
URLSessionReadClosedForStreamTask
default void URLSessionReadClosedForStreamTask(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionStreamTask streamTask)Indicates that the read side of a connection has been closed. Any outstanding reads complete, but future reads will immediately fail. This may be sent even when no reads are in progress. However, when this delegate message is received, there may still be bytes available. You only know that no more bytes are available when you are able to read until EOF.
-
URLSessionStreamTaskDidBecomeInputStreamOutputStream
default void URLSessionStreamTaskDidBecomeInputStreamOutputStream(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionStreamTask streamTask, @NotNull @NotNull NSInputStream inputStream, @NotNull @NotNull NSOutputStream outputStream)The given task has been completed, and unopened NSInputStream and NSOutputStream objects are created from the underlying network connection. This will only be invoked after all enqueued IO has completed (including any necessary handshakes.) The streamTask will not receive any further delegate messages.
-
URLSessionWriteClosedForStreamTask
default void URLSessionWriteClosedForStreamTask(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionStreamTask streamTask)Indicates that the write side of a connection has been closed. Any outstanding writes complete, but future writes will immediately fail.
-
-