> On Apr 15, 2016, at 8:29 PM, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On Apr 15, 2016, at 3:25 PM, Daryle Walker <dary...@mac.com 
>> <mailto:dary...@mac.com>> wrote:
>> 
>> My mind was on non-HTTP(S) transactions. It seems that 
>> NSURLSessionStreamTask can be used both from transitioning HTTP data-stream 
>> transactions and from original transactions.  
> 
> You’re right, the docs imply that. It just seems a bit weird since you’re 
> still giving the session a URL, which implies an NSURLProtocol registered to 
> handle that scheme. Like, if you write a Gopher implementation you probably 
> can’t just start it from a “gopher:…” URL or you’ll get an error about the 
> scheme not being recognized. But if you implement a Gopher NSURLProtocol, 
> that class would be responsible for doing the networking itself, which 
> creates a chicken-and-egg problem.
> 
> The alternative is that you’d just give the session an HTTP URL, even though 
> there wouldn’t be any HTTP parsing going on. Which seems awkward.

Are you sure you have that right?  URLs are processed at the NSURLSessionTask 
(subclass) level, not the NSURLSession level, so the recursion chain you 
describe doesn’t happen (I think).  The theoretical Gopher-aligned 
NSURLProtocol class should be able to allocate a NSURLSession object and make a 
NSURLSessionStreamTask from there.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to