@@ -71,7 +71,7 @@ public protocol URLSessionDelegate : NSObjectProtocol {
7171 * behavior will be to use the default handling, which may involve user
7272 * interaction.
7373 */
74- func urlSession( _ session: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void )
74+ func urlSession( _ session: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void )
7575}
7676
7777extension URLSessionDelegate {
@@ -115,19 +115,19 @@ public protocol URLSessionTaskDelegate : URLSessionDelegate {
115115 * necessary when authentication has failed for any request that
116116 * involves a body stream.
117117 */
118- func urlSession( _ session: URLSession , task: URLSessionTask , needNewBodyStream completionHandler: @escaping ( InputStream ? ) -> Void )
118+ func urlSession( _ session: URLSession , task: URLSessionTask , needNewBodyStream completionHandler: @escaping ( InputStream ? ) -> Void )
119119
120120 /* Sent periodically to notify the delegate of upload progress. This
121121 * information is also available as properties of the task.
122122 */
123- func urlSession( _ session: URLSession , task: URLSessionTask , didSendBodyData bytesSent: Int64 , totalBytesSent: Int64 , totalBytesExpectedToSend: Int64 )
123+ func urlSession( _ session: URLSession , task: URLSessionTask , didSendBodyData bytesSent: Int64 , totalBytesSent: Int64 , totalBytesExpectedToSend: Int64 )
124124
125125 /* Sent as the last message related to a specific task. Error may be
126126 * nil, which implies that no error occurred and this task is complete.
127127 */
128- func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? )
128+ func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? )
129129
130- func urlSession( _ session: URLSession , task: URLSessionTask , willBeginDelayedRequest request: URLRequest , completionHandler: @escaping ( URLSession . DelayedRequestDisposition , URLRequest ? ) -> Void )
130+ func urlSession( _ session: URLSession , task: URLSessionTask , willBeginDelayedRequest request: URLRequest , completionHandler: @escaping ( URLSession . DelayedRequestDisposition , URLRequest ? ) -> Void )
131131
132132 func urlSession( _ session: URLSession , task: URLSessionTask , didFinishCollecting metrics: URLSessionTaskMetrics )
133133}
@@ -208,7 +208,7 @@ public protocol URLSessionDataDelegate : URLSessionTaskDelegate {
208208 * attempted for a given resource, and you should not rely on this
209209 * message to receive the resource data.
210210 */
211- func urlSession( _ session: URLSession , dataTask: URLSessionDataTask , willCacheResponse proposedResponse: CachedURLResponse , completionHandler: @escaping ( CachedURLResponse ? ) -> Void )
211+ func urlSession( _ session: URLSession , dataTask: URLSessionDataTask , willCacheResponse proposedResponse: CachedURLResponse , completionHandler: @escaping ( CachedURLResponse ? ) -> Void )
212212
213213}
214214
@@ -236,17 +236,17 @@ public protocol URLSessionDownloadDelegate : URLSessionTaskDelegate {
236236 * removed when the delegate message returns. URLSession:task:didCompleteWithError: will
237237 * still be called.
238238 */
239- func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didFinishDownloadingTo location: URL )
239+ func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didFinishDownloadingTo location: URL )
240240
241241 /* Sent periodically to notify the delegate of download progress. */
242- func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didWriteData bytesWritten: Int64 , totalBytesWritten: Int64 , totalBytesExpectedToWrite: Int64 )
242+ func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didWriteData bytesWritten: Int64 , totalBytesWritten: Int64 , totalBytesExpectedToWrite: Int64 )
243243
244244 /* Sent when a download has been resumed. If a download failed with an
245245 * error, the -userInfo dictionary of the error will contain an
246246 * URLSessionDownloadTaskResumeData key, whose value is the resume
247247 * data.
248248 */
249- func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didResumeAtOffset fileOffset: Int64 , expectedTotalBytes: Int64 )
249+ func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didResumeAtOffset fileOffset: Int64 , expectedTotalBytes: Int64 )
250250}
251251
252252extension URLSessionDownloadDelegate {
@@ -263,13 +263,13 @@ public protocol URLSessionStreamDelegate : URLSessionTaskDelegate {
263263 * this delegate message is received, there may still be bytes
264264 * available. You only know that no more bytes are available when you
265265 * are able to read until EOF. */
266- func urlSession( _ session: URLSession , readClosedFor streamTask: URLSessionStreamTask )
266+ func urlSession( _ session: URLSession , readClosedFor streamTask: URLSessionStreamTask )
267267
268268 /* Indicates that the write side of a connection has been closed.
269269 * Any outstanding writes complete, but future writes will immediately
270270 * fail.
271271 */
272- func urlSession( _ session: URLSession , writeClosedFor streamTask: URLSessionStreamTask )
272+ func urlSession( _ session: URLSession , writeClosedFor streamTask: URLSessionStreamTask )
273273
274274 /* A notification that the system has determined that a better route
275275 * to the host has been detected (eg, a wi-fi interface becoming
@@ -278,15 +278,15 @@ public protocol URLSessionStreamDelegate : URLSessionTaskDelegate {
278278 * there is no guarantee that the future task will be able to connect
279279 * to the host, so callers should should be prepared for failure of
280280 * reads and writes over any new interface. */
281- func urlSession( _ session: URLSession , betterRouteDiscoveredFor streamTask: URLSessionStreamTask )
281+ func urlSession( _ session: URLSession , betterRouteDiscoveredFor streamTask: URLSessionStreamTask )
282282
283283 /* The given task has been completed, and unopened InputStream and
284284 * OutputStream objects are created from the underlying network
285285 * connection. This will only be invoked after all enqueued IO has
286286 * completed (including any necessary handshakes.) The streamTask
287287 * will not receive any further delegate messages.
288288 */
289- func urlSession( _ session: URLSession , streamTask: URLSessionStreamTask , didBecome inputStream: InputStream , outputStream: OutputStream )
289+ func urlSession( _ session: URLSession , streamTask: URLSessionStreamTask , didBecome inputStream: InputStream , outputStream: OutputStream )
290290}
291291
292292extension URLSessionStreamDelegate {
0 commit comments