p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad (http://p2p.wrox.com/book-professional-ios-network-programming-connecting-enterprise-iphone-ipad-708/)
-   -   Chapter 13: I am at a complete loss. Please HELP! (http://p2p.wrox.com/book-professional-ios-network-programming-connecting-enterprise-iphone-ipad/99172-chapter-13-i-am-complete-loss-please-help.html)

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.

Thanx.


Alex


All times are GMT -4. The time now is 03:59 AM.

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