site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=rENG9P+tkowEPvuqlk7MziuoCbVEQ DwTdczFVhJHcZs=; b=cBjV5R1bF8iMwmQH/8DaNabUeofvfs1BNtUjqwKS/iGyK Aq/zEk3Ng0QEDVByGoCoN8ju5TyAlrdZgrq54KH8jteuLB5g6e/HJYng6yu+Q8kr x41GMQ5EKSruRwHe6mAYZvX4RbJjBLhMo3meVh0HwC2qzCloLltgjpMz5Nm/GAoB KlR9SY/XZq/zzJ6NYqr7lqRGkW1DF+Lfjs67pqqjrFurRhyQVAIMYdfZjl5T8FFu uCqPY5Pxb492Kot2Hgdda5FR4ixVFJXQXrqY/JHVEMXEE2nv7uJ+cDnLwckDcF7E 8uipLtNI37j5Ipc1tWyhKNxPIqYa57KsPdkDqxviw==
On Aug 5, 2018, at 11:15 AM, Daryle Walker <darylew@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/site_archiver%40lists... This email sent to site_archiver@lists.apple.com