@@ -71,7 +71,7 @@ public protocol URLSessionDelegate : NSObjectProtocol {
71
71
* behavior will be to use the default handling, which may involve user
72
72
* interaction.
73
73
*/
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 )
75
75
}
76
76
77
77
extension URLSessionDelegate {
@@ -115,19 +115,19 @@ public protocol URLSessionTaskDelegate : URLSessionDelegate {
115
115
* necessary when authentication has failed for any request that
116
116
* involves a body stream.
117
117
*/
118
- func urlSession( _ session: URLSession , task: URLSessionTask , needNewBodyStream completionHandler: @escaping ( InputStream ? ) -> Void )
118
+ func urlSession( _ session: URLSession , task: URLSessionTask , needNewBodyStream completionHandler: @escaping ( InputStream ? ) -> Void )
119
119
120
120
/* Sent periodically to notify the delegate of upload progress. This
121
121
* information is also available as properties of the task.
122
122
*/
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 )
124
124
125
125
/* Sent as the last message related to a specific task. Error may be
126
126
* nil, which implies that no error occurred and this task is complete.
127
127
*/
128
- func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? )
128
+ func urlSession( _ session: URLSession , task: URLSessionTask , didCompleteWithError error: Error ? )
129
129
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 )
131
131
132
132
func urlSession( _ session: URLSession , task: URLSessionTask , didFinishCollecting metrics: URLSessionTaskMetrics )
133
133
}
@@ -208,7 +208,7 @@ public protocol URLSessionDataDelegate : URLSessionTaskDelegate {
208
208
* attempted for a given resource, and you should not rely on this
209
209
* message to receive the resource data.
210
210
*/
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 )
212
212
213
213
}
214
214
@@ -236,17 +236,17 @@ public protocol URLSessionDownloadDelegate : URLSessionTaskDelegate {
236
236
* removed when the delegate message returns. URLSession:task:didCompleteWithError: will
237
237
* still be called.
238
238
*/
239
- func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didFinishDownloadingTo location: URL )
239
+ func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didFinishDownloadingTo location: URL )
240
240
241
241
/* 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 )
243
243
244
244
/* Sent when a download has been resumed. If a download failed with an
245
245
* error, the -userInfo dictionary of the error will contain an
246
246
* URLSessionDownloadTaskResumeData key, whose value is the resume
247
247
* data.
248
248
*/
249
- func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didResumeAtOffset fileOffset: Int64 , expectedTotalBytes: Int64 )
249
+ func urlSession( _ session: URLSession , downloadTask: URLSessionDownloadTask , didResumeAtOffset fileOffset: Int64 , expectedTotalBytes: Int64 )
250
250
}
251
251
252
252
extension URLSessionDownloadDelegate {
@@ -263,13 +263,13 @@ public protocol URLSessionStreamDelegate : URLSessionTaskDelegate {
263
263
* this delegate message is received, there may still be bytes
264
264
* available. You only know that no more bytes are available when you
265
265
* are able to read until EOF. */
266
- func urlSession( _ session: URLSession , readClosedFor streamTask: URLSessionStreamTask )
266
+ func urlSession( _ session: URLSession , readClosedFor streamTask: URLSessionStreamTask )
267
267
268
268
/* Indicates that the write side of a connection has been closed.
269
269
* Any outstanding writes complete, but future writes will immediately
270
270
* fail.
271
271
*/
272
- func urlSession( _ session: URLSession , writeClosedFor streamTask: URLSessionStreamTask )
272
+ func urlSession( _ session: URLSession , writeClosedFor streamTask: URLSessionStreamTask )
273
273
274
274
/* A notification that the system has determined that a better route
275
275
* to the host has been detected (eg, a wi-fi interface becoming
@@ -278,15 +278,15 @@ public protocol URLSessionStreamDelegate : URLSessionTaskDelegate {
278
278
* there is no guarantee that the future task will be able to connect
279
279
* to the host, so callers should should be prepared for failure of
280
280
* reads and writes over any new interface. */
281
- func urlSession( _ session: URLSession , betterRouteDiscoveredFor streamTask: URLSessionStreamTask )
281
+ func urlSession( _ session: URLSession , betterRouteDiscoveredFor streamTask: URLSessionStreamTask )
282
282
283
283
/* The given task has been completed, and unopened InputStream and
284
284
* OutputStream objects are created from the underlying network
285
285
* connection. This will only be invoked after all enqueued IO has
286
286
* completed (including any necessary handshakes.) The streamTask
287
287
* will not receive any further delegate messages.
288
288
*/
289
- func urlSession( _ session: URLSession , streamTask: URLSessionStreamTask , didBecome inputStream: InputStream , outputStream: OutputStream )
289
+ func urlSession( _ session: URLSession , streamTask: URLSessionStreamTask , didBecome inputStream: InputStream , outputStream: OutputStream )
290
290
}
291
291
292
292
extension URLSessionStreamDelegate {
0 commit comments