Questions about NWTCPConnection

I want to know how the connection mode of NWTCPConnection works.



Is the blocking mode used?



I didn't find the answer in the official document, I hope someone can help me.



Can it be changed to non-blocking mode if it is blocking mode?

Accepted Answer
NWTCPConnection
is an asynchronous API.

ps Your questions about “blocking mode” assume that, under the covers,

NWTCPConnection
is using a BSD Socket. This is not the case [1]. Rather, it’s implemented using our shiny new user-space networking stack, as introduced in WWDC 2017 Session 707 Advances in Networking, Part 1.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] Except for macOS, where the continued existence of NKEs means that we can’t yet enable user-space networking.

Thank you eskimo.

You answered my doubts!

Questions about NWTCPConnection
 
 
Q