> On Aug 5, 2018, at 11:15 AM, Daryle Walker <dary...@mac.com> wrote: > > 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)?
The obvious: Network.framework is only available from iOS 12 / macOS 10.14. We used NSURLSessionStreamTask in Couchbase Lite 2.0, and it's unfortunately somewhat buggy. On iOS 10 it would crash periodically. On iOS 11 it's fine for the most part unless the device is behind an HTTP proxy, and then it will sometimes write data in the wrong order[1] and occasionally crash[2]. This caused a panic situation for us, because a major customer has all of their devices behind a proxy, so we unfortunately had to rip out the NSURLSessionStreamTask code and replace it with NSStream. Of course YMMV, and we couldn't identify exactly what triggered these bugs, other than that they all looked like the result of thread-safety problems inside the implementation of NSURLSessionStreamTask. —Jens [1]: rdar://41140274 [2]: rdar://41162231
_______________________________________________ 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