• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Still interested in (NS)URLSessionStreamTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still interested in (NS)URLSessionStreamTask


  • Subject: Re: Still interested in (NS)URLSessionStreamTask
  • From: Daryle Walker <email@hidden>
  • Date: Fri, 10 Feb 2017 19:37:14 -0500


On Feb 7, 2017, at 5:14 PM, Jens Alfke <email@hidden> wrote:


On Feb 7, 2017, at 12:40 PM, Daryle Walker <email@hidden> wrote:

The reference docs seem to have slapped in this subclass, and the guide doesn't mention it at all. The interaction model of the other tasks, prepping all the configuration then fire, doesn't fit this one. Session tasks seem to be more interactive; they can't be done-in-one. 

The other tasks aren’t really that way either; they just have convenience methods that give you one-shot access. If you look at NSURLSessionTaskDelegate, there are quite a few messages that you receive, about auth challenges, headers, data, errors and completion.

I haven’t tried using stream-tasks yet, though I plan to (they should be useful for implementing WebSockets.) The API looks fairly straightforward, sort of a cross between regular NSURLSession stuff and NSStream. 

Have you tried writing any code yet, or are you still waiting for docs? I suggest just diving in…

Waiting for docs, or similar, since how I described the interaction model meant it wasn’t obvious how to proceed. But another poster added an example to the thread.

Here’s an analogy on how I felt on the interaction model. The older task types are like being given an address and also which way (to or from) to go and what to do with the information. This new task is like being given just an address. A fire-and-forget interface for the former couldn’t work with the latter, since the latter also needs to manually insert your walking directions.

— 
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

References: 
 >Re: Still interested in (NS)URLSessionStreamTask (From: Daryle Walker <email@hidden>)
 >Re: Still interested in (NS)URLSessionStreamTask (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Still interested in (NS)URLSessionStreamTask
  • Next by Date: Re: Not getting an NSStreamEventHasBytesAvailable message
  • Previous by thread: Re: Still interested in (NS)URLSessionStreamTask
  • Next by thread: Re: Still interested in (NS)URLSessionStreamTask
  • Index(es):
    • Date
    • Thread