• 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: NWConnection vs. NSURLSessionStreamTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NWConnection vs. NSURLSessionStreamTask


  • Subject: Re: NWConnection vs. NSURLSessionStreamTask
  • From: Joshua Graessley <email@hidden>
  • Date: Sun, 05 Aug 2018 22:23:26 -0700

> On Aug 5, 2018, at 11:15, Daryle Walker <email@hidden> wrote:
>
> Been watching WWDC-2018 videos for the past few weeks.  Just saw the one on
> Network.framework.  This library is what the URLSession system uses in its
> implementation.  The video did a lot on using N.f for the server side, but it
> did mention some client-side uses, like an IMAP app.  But, for client use,
> are there any pro/cons to using NWConnection versus NSURLSessionStreamTask
> for non-HTTP-based protocols (including the many pre-HTTP ones)?

For non-HTTP, use the best fit for your application. Network.fw is built on
dispatch queues and blocks. URLSession is based on delegates.

If you need UDP, use Network.fw as URLSessionStreamTask does not support UDP.

If you need control over TCP or TLS settings not provided by URLSession, use
Network.fw.

-josh
 _______________________________________________
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: 
 >NWConnection vs. NSURLSessionStreamTask (From: Daryle Walker <email@hidden>)

  • Prev by Date: NWConnection vs. NSURLSessionStreamTask
  • Next by Date: Re: Apple modern client/server paradigm
  • Previous by thread: NWConnection vs. NSURLSessionStreamTask
  • Next by thread: Re: NWConnection vs. NSURLSessionStreamTask
  • Index(es):
    • Date
    • Thread