2015AppleInc.
Allrightsreserved.
RedistributionorpublicdisplaynotpermittedwithoutwrittenpermissionfromApple.
#WWDC15NetworkingwithNSURLSessionLukeCaseSoftwareEngineerAndreasGarkuschaSoftwareEngineerDanVinegradSoftwareEngineerSystemFrameworksSession711AppTransportSecurityNewprotocolsupportinNSURLSessionNSURLSessiononwatchOSNSURLSessionAPIchangesNSURLSessionAPIfordownloadingHTTPcontentRichsetofdelegatemethodsBackgrounddownload/uploadcapabilityHTTP(cleartext)HTTP(cleartext)GETHTTP/1.
1200OKHTTP(cleartext)HTTP(cleartext)HTTP(cleartext)HTTPSHTTPSHTTPSHTTPoverTLSEncryptionIntegrityAuthenticationProtectingCustomerDataHTTPS:securingHTTPwithTLS"http://"to"https://"ServersupportrequiredWidespreadsupportavailableAlldataissensitiveAppTransportSecurityProtectingCustomerDataWhatisAppTransportSecurity(ATS)DisallowscleartextHTTPURLloadsEncouragesbestpracticesecureconnectionsDefaultstostrongersecurityAllowscongurationviaapp'sInfo.
plistHTTPSNSAppTransportSecurityNSExceptionDomains"example.
com"NSIncludesSubdomains=YESNSExceptionRequiresForwardSecrecy=NONSExceptionMinimumTLSVersion="TLSv1.
1"HTTPSHTTPSMediaServerNSAppTransportSecurityNSExceptionDomains"media.
example.
com"NSExceptionAllowsInsecureHTTPLoads=YESNSAppTransportSecurityNSAllowsArbitraryLoads=YESServerNSAppTransportSecurityNSAllowsArbitraryLoadsNSExceptionDomains"secure.
example.
com"NSExceptionAllowsInsecureHTTPLoads=NOConguringATSDiagnosingissuesActivewhenyoubuildyourappforiOS9andOSXElCapitan"http://"to"https://"isautomaticUseNSAllowsArbitraryLoadsforquicktriageLogNSURLSessionerrorsCFNETWORK_DIAGNOSTICS=1ProtectingCustomerDataNextstepsUseHTTPSfornewprojectsTransitionexistingappsfromHTTPtoHTTPSUseexceptionswhereneededNewProtocolSupportinNSURLSessionAndreasGarkuschaSoftwareEngineerNewinNSURLSessionNewinNSURLSessionHTTP/2RFC7540NewinNSURLSessionHTTP/2RFC7540NewinNSURLSessionNewinNSURLSessionNewinNSURLSessionHTTP/2RFC7540FutureoftheWebMajormilestoneintheevolutionoftheWebMakestheWebfasterSolvesHTTP/1.
1problemsHTTP/2inNSURLSessionWhyanewprotocolHTTP/2indepthAdoptionusingNSURLSessionWhyaNewProtocolWhyaNewProtocolWhyaNewProtocolFTPHTTPPOP3LDAPRTPSMTPNTPTCPIMAPUDPARPSNMPPPPSOAPICMPIPAPXTelnetRADIUSVNCSSHVoIPAFPsmbnfsDHCPSKYPERDPWebSocketRIPAIMBonjourICQQUAKE3…WhyaNewProtocolFTPHTTPPOP3LDAPRTPSMTPNTPTCPIMAPUDPARPSNMPPPPSOAPICMPIPAPXTelnetRADIUSVNCSSHVoIPAFPsmbnfsDHCPSKYPERDPWebSocketRIPAIMBonjourICQQUAKE3…WhyaNewProtocolHTTP/1.
1CommonIssuesHTTP/1.
1CommonissuesOneoutstandingrequestHTTP/1.
1CommonissuesOneoutstandingrequestHTTPpipeliningHTTP/1.
1CommonissuesOneoutstandingrequestHTTPpipeliningMultipleconnectionsHTTP/1.
1CommonissuesOneoutstandingrequestHTTPpipeliningMultipleconnectionsTextualprotocoloverheadHTTP/1.
1CommonissuesOneoutstandingrequestHTTPpipeliningMultipleconnectionsTextualprotocoloverheadHeadercompressionThePathtoHTTP/2ExperimentalprotocolsSpecicationforHTTP/2IETFstandardization,RFCNewinNSURLSessionNewinNSURLSessionHTTP/2RFC7540HTTP/1.
1HTTP/2HTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHead-of-lineblockingFullymultiplexedHTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHead-of-lineblockingFullymultiplexedFIFOrestrictionsRequestshaveprioritiesHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHigh(withoutPipelining)HTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHighimage.
jpgstyles.
cssdata.
xml(withoutPipelining)HTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHighimage.
jpgstyles.
cssdata.
xmlGET(withoutPipelining)200OKHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHighimage.
jpgstyles.
cssdata.
xmlGET(withoutPipelining)HTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHighimage.
jpgstyles.
cssdata.
xml(withoutPipelining)HTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:MultiplexingPriorityLegendLowMediumHighimage.
jpgstyles.
cssdata.
xml(withoutPipelining)HTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xml(withoutPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/1.
1:Head-of-LineBlockingHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xml(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/2-MultiplexingSolutionforHead-of-LineBlockingproblemTimeHTTP/2:Multiplexingimage.
jpgstyles.
cssdata.
xmlimage.
jpgstyles.
cssdata.
xmlHTTP/1.
1:Head-of-LineBlocking(withPipelining)PriorityLegendLowMediumHighHTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHead-of-lineblockingFullymultiplexedFIFOrestrictionsRequestshaveprioritiesHTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHead-of-lineblockingFullymultiplexedFIFOrestrictionsRequestshaveprioritiesTextualprotocoloverheadBinaryHTTP/1.
1HTTP/2MultipleTCPconnectionstoahostOnlyoneTCPconnectionHead-of-lineblockingFullymultiplexedFIFOrestrictionsRequestshaveprioritiesTextualprotocoloverheadBinaryNoheadercompressionHeadercompression(HPACK)IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateHPACKStaticTableDynamicTableIndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTableIndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTableGET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTable:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTable:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTable:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTable:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionHPACKStaticTableIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateDynamicTable:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:IndexHeaderNameHeaderValue-HTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticate:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:HPACKStaticTableDynamicTableIndexHeaderNameHeaderValue-HTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticate:method:GET:scheme:https:path:/:authority:www.
example.
comHTTP/2Representation:GET/HTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Request:www.
example.
comHPACKStaticTableDynamicTableIndexHeaderNameHeaderValue1:authoritywww.
example.
comHTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateHPACKStaticTableDynamicTableIndexHeaderNameHeaderValue1:authoritywww.
example.
comHTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateHPACKStaticTableDynamicTableIndexHeaderNameHeaderValue1:authoritywww.
example.
comHTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateGET/index.
htmlHTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Secondrequest:HPACKStaticTableDynamicTableIndexHeaderNameHeaderValue1:authoritywww.
example.
comHTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateGET/index.
htmlHTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Secondrequest:HTTP/2Secondrequest::method:GET:scheme:https:path:/index.
html:authority:www.
example.
comHPACKStaticTableDynamicTableIndexHeaderNameHeaderValue1:authoritywww.
example.
comHTTP/2HeaderCompressionIndexHeaderNameHeaderValue1:authority2:methodGET3:methodPOST4:path/5:path/index.
html6:schemehttp7:schemehttps8:status200……14:status50015accept-charset16accept-encodinggzip,deate17accept-language……57transfer-encoding58user-agent59vary60via61www-authenticateGET/index.
htmlHTTP/1.
1\r\nHost:www.
example.
com\r\nConnection:Keep-Alive\r\n\r\nHTTP/1.
1Secondrequest:HTTP/2Secondrequest:HPACKStaticTableDynamicTableHTTP/2AdoptionontheclientNSURLSessionsupportsHTTP/2protocolautomaticallyHTTP/2AdoptionontheclientNSURLSessionsupportsHTTP/2protocolautomaticallyNosourcecodechangesneededHTTP/2AdoptionontheclientNSURLSessionsupportsHTTP/2protocolautomaticallyNosourcecodechangesneededHTTP/2AdoptionontheclientletsessionConfig=NSURLSessionConfiguration.
defaultSessionConfiguration()letsession=NSURLSession(configuration:sessionConfig)leturl=NSURL(string:"https://www.
example.
com")!
lettask=session.
dataTaskWithURL(url){(data:NSData,response:NSURLResponse,error:NSError)in.
.
.
}task.
resume()YouOnlyNeedanHTTP/2ServerHTTP/2inNSURLSessionCompatibilityBackwardcompatiblewithHTTP/1.
1serversEncryptedconnectiononlyHTTP/2serverrequiresALPNorNPNsupportHTTP/2TodayCurrentadoptionHomeKitRemoteAccessviaiCloudServicesprovidedbyGoogleandTwitterOpensourcewebserversContentDeliveryNetworkprovidersHTTP/2AtaglanceHTTP/2isavailableinWWDCseedtodayAvailableinNSURLSessionEnabledinSafarionOSX10.
11andiOS9NSURLSessiononwatchOSDanVinegradSoftwareEngineerNSURLSessiononwatchOSFullysupportedforHTTP(S)Usesbestavailableconnectivity(iPhoneorWiFi)NSURLSessiononwatchOSFullysupportedforHTTP(S)Usesbestavailableconnectivity(iPhoneorWiFi)It'sMagicNSURLSessiononwatchOSBestpracticesNSURLSessiononwatchOSBestpracticesDownloadtheminimalassetsrequiredSmallscreenLimitedbandwidthNSURLSessiononwatchOSBestpracticesDownloadtheminimalassetsrequiredSmallscreenLimitedbandwidthAppswillonlyrunforaveryshorttimeSendsmallamountsofdataUsebackgrounduploads/downloadsforlargercontentAPIChangesNSURLConnectionNSURLConnectionDeprecatedinOSX10.
11andiOS9.
0Notgoingaway,appsusingitwillstillworkNewfeatureswillbeaddedtoNSURLSessionNotsupportedonwatchOSSwitchingtoNSURLSessioniseasySwitchingtoNSURLSessionletqueue:NSOperationQueue=.
.
.
leturl=NSURL(string:"https://www.
example.
com")!
letrequest=NSURLRequest(URL:url)NSURLConnection.
sendAsynchronousRequest(request,queue:queue){(response:NSURLResponse,data:NSData,error:NSError)in.
.
.
}SwitchingtoNSURLSessionletqueue:NSOperationQueue=.
.
.
leturl=NSURL(string:"https://www.
example.
com")!
letrequest=NSURLRequest(URL:url)NSURLConnection.
sendAsynchronousRequest(request,queue:queue){(response:NSURLResponse,data:NSData,error:NSError)in.
.
.
}lettask=NSURLSession.
sharedSession().
dataTaskWithRequest(request){(data:NSData,response:NSURLResponse,error:NSError)in.
.
.
}task.
resume()NewNSURLSessionAPISharingCookiesBetweenAppsandExtensionsAppsandtheirextensionshavedierentcookiestoragesbydefaultCanuseapplicationgroupstogetashareddatacontainerOSX10.
11andiOS9introducenewAPItocreateasharedcookiestorageNewNSHTTPCookieStorageAPIletident="group.
mycompany.
mygroupname"letcookieStorage=NSHTTPCookieStorage.
sharedCookieStorageForGroupContainerIdentifier(identifier:ident)letconfig=NSURLSessionConfiguration.
defaultSessionConfiguration()config.
HTTPCookieStorage=cookieStorageletsession=NSURLSession(configuration:config)NSURLSessionStreamTaskTCP/IPnetworkingNSURLSessionStreamTaskTCP/IPnetworkingSometimesneedaprotocolotherthanHTTP(S)NSURLSessionStreamTaskTCP/IPnetworkingSometimesneedaprotocolotherthanHTTP(S)AdvantagesoverNSInputStream/NSOutputStreamAsynchronousread/writeinterfaceCanautomaticallygetthroughHTTPproxiesNewAPIgoodiesNSURLSessionStreamTaskTCP/IPnetworkingSometimesneedaprotocolotherthanHTTP(S)AdvantagesoverNSInputStream/NSOutputStreamAsynchronousread/writeinterfaceCanautomaticallygetthroughHTTPproxiesNewAPIgoodiesLegacyNSStreamsupportNSURLSessionStreamTaskTCP/IPnetworkingNSURLSessionStreamTaskTCP/IPnetworkingSupportsTCP/IPconnections:HostnameandportNSNetServiceresolutionNSURLSessionStreamTaskTCP/IPnetworkingSupportsTCP/IPconnections:HostnameandportNSNetServiceresolutionUsesexistingNSURLSessioncongurationandsessiondelegatesNSURLSessionStreamTaskTCP/IPnetworkingSupportsTCP/IPconnections:HostnameandportNSNetServiceresolutionUsesexistingNSURLSessioncongurationandsessiondelegatesSecureTLSconnectionssupportedEvenafterconnected!
NSURLSessionStreamTaskAsynchronousreadlettask=NSURLSession.
sharedSession().
streamTaskWithHostName("chat.
example.
com",port:5555)!
task.
resume()task.
readDataOfMinLength(16384,maxLength:65536,timeout:30.
0){(data:NSData,eof:Bool,error:NSError)in.
.
.
}NSURLSessionStreamTaskAsynchronouswritelettask=NSURLSession.
sharedSession().
streamTaskWithHostName("chat.
example.
com",port:5555)!
task.
resume()letdata:NSData=.
.
.
task.
writeData(data,timeout:30.
0){(error:NSError)in.
.
.
}NSURLSessionStreamTaskEnablingTLSlettask=NSURLSession.
sharedSession().
streamTaskWithHostName("chat.
example.
com",port:5555)!
task.
startSecureConnection()task.
resume()letdata:NSData=.
.
.
task.
writeData(data,timeout:30.
0){(error:NSError)in.
.
.
}NSURLSessionStreamTaskConversiontoNSStreamsNSURLSessionStreamTaskConversiontoNSStreamsSomeexistingAPIsconsumeNSStreamobjectsNSURLSessionStreamTaskConversiontoNSStreamsSomeexistingAPIsconsumeNSStreamobjectsPendingreads/writescompletebeforeNSStreamsareproducedNSURLSessionStreamTaskConversiontoNSStreamsSomeexistingAPIsconsumeNSStreamobjectsPendingreads/writescompletebeforeNSStreamsareproducedDetachesthetaskfromthesessionNSURLSessionStreamTaskNSStreamsupportletstreamTask:NSURLSessionStreamTask=…streamTask.
captureStreams()NSURLSessionStreamTaskNSStreamsupportfuncURLSession(session:NSURLSession,streamTask:NSURLSessionStreamTask,didBecomeInputStreaminputStream:NSInputStream,outputStream:NSOutputStream){//CanpassinputStream/outputStreamtoAPIsthatconsumeNSStreams}NSURLSessionStreamTaskOther(informational)delegatemethodsoptionalfuncURLSession(session:NSURLSession,betterRouteDiscoveredForStreamTaskstreamTask:NSURLSessionStreamTask)NSURLSessionStreamTaskOther(informational)delegatemethodsoptionalfuncURLSession(session:NSURLSession,betterRouteDiscoveredForStreamTaskstreamTask:NSURLSessionStreamTask)optionalfuncURLSession(session:NSURLSession,readClosedForStreamTaskstreamTask:NSURLSessionStreamTask)optionalfuncURLSession(session:NSURLSession,writeClosedForStreamTaskstreamTask:NSURLSessionStreamTask)NSURLSessionStreamTaskDataTaskconversionNSURLSessionStreamTaskDataTaskconversionNSURLSessionDataTaskmaybeconvertedtoastreamtaskUseNSURLSessiontogetthroughHTTPproxiesNSURLSessionStreamTaskDataTaskconversionNSURLSessionDataTaskmaybeconvertedtoastreamtaskUseNSURLSessiontogetthroughHTTPproxiesConversioncanoccurwhenresponseisreceivedNSURLSessionStreamTaskDataTaskconversionfuncURLSession(session:NSURLSession,dataTask:NSURLSessionDataTask,didReceiveResponseresponse:NSURLResponse,completionHandler:(NSURLSessionResponseDisposition)->Void){completionHandler(.
BecomeStream)}funcURLSession(session:NSURLSession,dataTask:NSURLSessionDataTask,didBecomeStreamTaskstreamTask:NSURLSessionStreamTask){}SummaryAppTransportSecurityHTTP/2supportinNSURLSessionNSURLSessiononwatchOSNSURLConnectiondeprecationNewAPIGroupcontainercookiestoragesNSURLSessionStreamTaskMoreInformationDocumentationDeveloperResourceshttps://developer.
apple.
comTechnicalSupportAppleDeveloperForumshttp://devforums.
apple.
comDeveloperTechnicalSupporthttp://developer.
apple.
com/support/technicalGeneralInquiriesPaulDanbold,CoreOSEvangelistdanbold@apple.
comRelatedSessionsSecurityandYourAppsMissionTuesday4:30PMIntroducingWatchConnectivityPacicHeightsThursday11:00AMYourAppandNextGenerationNetworksMissionFriday11:00AMRelatedLabsNetworkingLabFrameworksLabEThursday10:00AMNetworkingLabFrameworksLabBFriday1:30PM
hosthatch在做美国独立日促销,可能你会说这操作是不是晚了一个月?对,为了准备资源等,他们拖延到现在才有空,这次是针对自己全球14个数据中心的VPS。提前示警:各个数据中心的网络没有一个是针对中国直连的,都会绕道而且ping值比较高,想买的考虑清楚再说!官方网站:https://hosthatch.com所有VPS都基于KVM虚拟,支持PayPal在内的多种付款方式!芝加哥(大硬盘)VPS5...
onevps最新消息,为了更好服务中国区用户:1、网站支付方式新增了支付宝,即将增加微信;原信用卡、PayPal方式不变;(2)可以切换简体中文版网站,在网站顶部右上角找到那个米字旗,下拉可以换中国简体版本。VPS可选机房有:中国(香港)、新加坡、日本(东京)、美国(纽约、洛杉矶)、英国(伦敦)、荷兰(阿姆斯特丹)、瑞士(苏黎世)、德国(法兰克福)、澳大利亚(悉尼)。不管你的客户在亚太区域、美洲区...
Ceraus数据成立于2020年底,基于KVM虚拟架构技术;主营提供香港CN2、美国洛杉矶CN2、日本CN2的相关VPS云主机业务。喜迎国庆香港上新首月五折不限新老用户,cera机房,线路好,机器稳,适合做站五折优惠码:gqceraus 续费七五折官方网站:https://www.ceraus.com香港云内存CPU硬盘流量宽带优惠价格购买地址香港云2G2核40G不限5Mbps24元/月点击购买...
acceptencoding为你推荐
请各矿将表填好后于2017年3月1日前发至zhxsh411@163.com邮箱.SCProuteboxiphone重庆网通重庆联通现在有哪些资费???iexplore.exe应用程序错误iexplore.exe应用程序错误用itunes备份iphone怎么从itunes备份恢复google搜图google自定义搜索是什么?怎么用卡巴斯基好用吗卡巴斯基 好用吗搜狗拼音输入法4.3搜狗拼音输入法最旧版阻抗fusioncharts
网站空间免备案 山东vps 免费域名跳转 国外永久服务器 台湾服务器 站群服务器 softbank官网 payoneer 12u机柜尺寸 网通代理服务器 最好的空间 本网站在美国维护 免费网站申请 台湾谷歌地址 帽子云 网通服务器托管 metalink ca187 空间首页登陆 防cc攻击 更多