Re: NSURLSessionStreamTask
Re: NSURLSessionStreamTask
- Subject: Re: NSURLSessionStreamTask
- From: Daryle Walker <email@hidden>
- Date: Sat, 16 Apr 2016 18:29:44 -0400
On Apr 15, 2016, at 8:29 PM, Jens Alfke < email@hidden> wrote:
On Apr 15, 2016, at 3:25 PM, Daryle Walker < email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden