@@ -668,56 +668,64 @@ open class URLSessionDownloadTask : URLSessionTask {
668
668
* disassociated from the underlying session.
669
669
*/
670
670
671
+ @available ( * , deprecated, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
671
672
open class URLSessionStreamTask : URLSessionTask {
672
673
673
674
/* Read minBytes, or at most maxBytes bytes and invoke the completion
674
675
* handler on the sessions delegate queue with the data or an error.
675
676
* If an error occurs, any outstanding reads will also fail, and new
676
677
* read requests will error out immediately.
677
678
*/
678
- open func readData( ofMinLength minBytes: Int , maxLength maxBytes: Int , timeout: TimeInterval , completionHandler: @escaping ( Data ? , Bool , Error ? ) -> Void ) { NSUnimplemented ( ) }
679
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
680
+ open func readData( ofMinLength minBytes: Int , maxLength maxBytes: Int , timeout: TimeInterval , completionHandler: @escaping ( Data ? , Bool , Error ? ) -> Void ) { NSUnsupported ( ) }
679
681
680
682
/* Write the data completely to the underlying socket. If all the
681
683
* bytes have not been written by the timeout, a timeout error will
682
684
* occur. Note that invocation of the completion handler does not
683
685
* guarantee that the remote side has received all the bytes, only
684
686
* that they have been written to the kernel. */
685
- open func write( _ data: Data , timeout: TimeInterval , completionHandler: @escaping ( Error ? ) -> Void ) { NSUnimplemented ( ) }
687
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
688
+ open func write( _ data: Data , timeout: TimeInterval , completionHandler: @escaping ( Error ? ) -> Void ) { NSUnsupported ( ) }
686
689
687
690
/* -captureStreams completes any already enqueued reads
688
691
* and writes, and then invokes the
689
692
* URLSession:streamTask:didBecomeInputStream:outputStream: delegate
690
693
* message. When that message is received, the task object is
691
694
* considered completed and will not receive any more delegate
692
695
* messages. */
693
- open func captureStreams( ) { NSUnimplemented ( ) }
696
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
697
+ open func captureStreams( ) { NSUnsupported ( ) }
694
698
695
699
/* Enqueue a request to close the write end of the underlying socket.
696
700
* All outstanding IO will complete before the write side of the
697
701
* socket is closed. The server, however, may continue to write bytes
698
702
* back to the client, so best practice is to continue reading from
699
703
* the server until you receive EOF.
700
704
*/
701
- open func closeWrite( ) { NSUnimplemented ( ) }
705
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
706
+ open func closeWrite( ) { NSUnsupported ( ) }
702
707
703
708
/* Enqueue a request to close the read side of the underlying socket.
704
709
* All outstanding IO will complete before the read side is closed.
705
710
* You may continue writing to the server.
706
711
*/
707
- open func closeRead( ) { NSUnimplemented ( ) }
712
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
713
+ open func closeRead( ) { NSUnsupported ( ) }
708
714
709
715
/*
710
716
* Begin encrypted handshake. The handshake begins after all pending
711
717
* IO has completed. TLS authentication callbacks are sent to the
712
718
* session's -URLSession:task:didReceiveChallenge:completionHandler:
713
719
*/
714
- open func startSecureConnection( ) { NSUnimplemented ( ) }
720
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
721
+ open func startSecureConnection( ) { NSUnsupported ( ) }
715
722
716
723
/*
717
724
* Cleanly close a secure connection after all pending secure IO has
718
725
* completed.
719
726
*/
720
- open func stopSecureConnection( ) { NSUnimplemented ( ) }
727
+ @available ( * , unavailable, message: " URLSessionStreamTask is not available in swift-corelibs-foundation " )
728
+ open func stopSecureConnection( ) { NSUnsupported ( ) }
721
729
}
722
730
723
731
/* Key in the userInfo dictionary of an NSError received during a failed download. */
0 commit comments