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
OneTechCloud发布了本月促销信息,全场VPS主机月付9折,季付8折,优惠后香港VPS月付25.2元起,美国CN2 GIA线路高防VPS月付31.5元起。这是一家2019年成立的国人主机商,提供VPS主机和独立服务器租用,产品数据中心包括美国洛杉矶和中国香港,Cera的机器,VPS基于KVM架构,采用SSD硬盘,其中美国洛杉矶回程CN2 GIA,可选高防。下面列出部分套餐配置信息。美国CN...
数脉科技怎么样?数脉科技品牌创办于2019,由一家从2012年开始从事idc行业的商家创办,目前主营产品是香港服务器,线路有阿里云线路和自营CN2线路,均为中国大陆直连带宽,适合建站及运行各种负载较高的项目,同时支持人民币、台币、美元等结算,提供支付宝、微信、PayPal付款方式。本次数脉科技给发来了新的7月促销活动,CN2+BGP线路的香港服务器,带宽10m起,配置E3-16G-30M-3IP,...
百纵科技:美国云服务器活动重磅来袭,洛杉矶C3机房 带金盾高防,会员后台可自助管理防火墙,添加黑白名单 CC策略开启低中高.CPU全系列E52680v3 DDR4内存 三星固态盘列阵。另有高防清洗!百纵科技官网:https://www.baizon.cn/联系QQ:3005827206美国洛杉矶 CN2 云服务器CPU内存带宽数据盘防御价格活动活动地址1核1G10M10G10G38/月续费同价点击...
acceptencoding为你推荐
229.254routepreloadedbaidu重要产品信息指南支持ipad支持ipad支持ipad支持ipadiphone连不上wifi为什么苹果手机连不上wifi微信都发不出去?ipad上网新买的ipad怎么用。什么装程序 怎么上网win7telnetwindows7的TELNET服务在哪里开启啊
主机域名 unsplash 好看的桌面背景图 坐公交投2700元 100x100头像 isp服务商 上海联通宽带测速 台湾google 主机管理系统 德讯 中国域名 空间服务器 godaddy空间 中美互联网论坛 国内云主机 sockscap教程 大容量存储方案 qq空间论坛 腾讯qq空间登录首页 华为4核手机 更多