Re: Network.framework and client/server?
Re: Network.framework and client/server?
- Subject: Re: Network.framework and client/server?
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Mon, 05 Nov 2018 08:25:26 +0000
On 3 Nov 2018, at 00:06, Carl Hoefs <email@hidden> wrote:
> So... the connection handler block makes each new connection in a new thread
> on the designated dispatch queue? If so, then that should work. It's just a
> bit unclear.
The first part of this sentence is correct: The connection handler is called to
tell you about new connections. The second half is not. Network framework is
fully async, so there’s no strong connection between connections and threads.
Rather, before you start an object (like a listener or a connection) you must
set its dispatch queue and the framework places all callbacks associated with
that object on that queue. Dispatch then assigns threads to run the callbacks
from those queues like it would any other queue.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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