I'm kinda new to Objective-C / Cocoa, and I'm trying to write a bonjour server-client app. Because I don't have much experience, I would appreciate if your replies could also include explanations on how to do it, and not just the code.
I manage to establish a connection, and input-output streams, between the server and the client, using the server's netService:didAcceptConnectionWithInputStream:outputStream
method.
The thing is, I want the server to have a list of all connected clients.
I know that the client's NSNetServiceBrowserDelegate have a method that is revoked whenever the connection with the bonjour service is ending,
But I can't find an equal method, with NSNetServiceDelegate
, that I can use on the server side, to run the appropriate code when a client disconnects.