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 <j...@mooseyard.com> wrote: > > > >> On Nov 2, 2018, at 3:33 PM, Carl Hoefs <newsli...@autonomy.caltech.edu >> <mailto:newsli...@autonomy.caltech.edu>> 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 (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