View Single Post
  #1 (permalink)  
Old September 5th, 2016, 05:43 AM
Alvas Alvas is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.


Reply With Quote