Re: NWConnection vs. NSURLSessionStreamTask
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