Re: Network.framework and client/server?
Re: Network.framework and client/server?
- Subject: Re: Network.framework and client/server?
- From: Carl Hoefs <email@hidden>
- Date: Fri, 02 Nov 2018 16:56:07 -0700
When using sockets, the accept(2) function returns a descriptor for the
accepted socket for each new connection. You can then issue the accept() again
and again on the same declared port to accommodate multiple simultaneous
connections.
How does one do that with Network.fw <http://network.fw/>? It listens on the
given port, but the incoming connection exclusively uses that port. Other
connections can't proceed until the first one disconnects.
Unless I'm totally missing the picture...
-Carl
> On Nov 2, 2018, at 4:44 PM, Jens Alfke <email@hidden> wrote:
>
>
>
>> On Nov 2, 2018, at 3:33 PM, Carl Hoefs <email@hidden
>> <mailto:email@hidden>> wrote:
>>
>> I've managed to cobble together some prototype code using Network.fw
>> <http://network.fw/> in a client/server paradigm (in which a macOS server
>> using Network.fw <http://network.fw/> receives and acts on multiple
>> simultaneous iOS connections). However, I'm finding that NWListener hogs
>> the main connection port so only the first connection can be served until it
>> disconnects. Isn't Network.fw <http://network.fw/> multithreaded?
>
> What does your code look like? I haven’t used Network.framework yet, but
> looking at <Network/listener.h>, the API seems pretty straightforward.
>
>> Also, I can't seem to find any documentation.
>
> The C headers in <Network/*.h> have a lot of documentation-comments.
>
> —Jens
_______________________________________________
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