Chapter 13: I am at a complete loss. Please HELP!
Hi everyone,
My name is Alex and I am a complete novice at iOS development. Please accept my sincere apologies if my question is completely silly no matter how many times I go through chapter 13 I just cannot figure out the answer.
I am trying to build a simple chatting application where users will be able to publish themselves via NSNetService, discover other users via NSNetServiceBrowser, and connect to other users via NSStream. Say for example that user "A" wants to connect with users "B", "C" and "D". Does user "A" have to create three distinct pairs of input/output streams (i.e. one for each of the users "B", "C" and "D") and if so, how can I keep track of the connected users and their respective streams?
I use the method getInputStream:outputStream: on the publishing side and the method netService:didAcceptConnectionWithInputStream:outp utStream: on the discovering side.
Thanx.
Alex
|