p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad (http://p2p.wrox.com/forumdisplay.php?f=708)
-   -   Chapter 13: I am at a complete loss. Please HELP! (http://p2p.wrox.com/showthread.php?t=99172)

Alvas September 5th, 2016 05:43 AM

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.



All times are GMT -4. The time now is 10:24 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.