Interface NSURLSessionStreamDelegate

    • Method Detail

      • URLSessionBetterRouteDiscoveredForStreamTask

        default void URLSessionBetterRouteDiscoveredForStreamTask​(NSURLSession session,
                                                                  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​(NSURLSession session,
                                                       NSURLSessionStreamTask streamTask)
        Indiciates 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​(NSURLSession session,
                                                                          NSURLSessionStreamTask streamTask,
                                                                          NSInputStream inputStream,
                                                                          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​(NSURLSession session,
                                                        NSURLSessionStreamTask streamTask)
        Indiciates that the write side of a connection has been closed. Any outstanding writes complete, but future writes will immediately fail.