peer - to - peer chat with AsyncSocket class

Discussion in 'Mac Programming' started by Monaj, Dec 23, 2009.

  1. Monaj macrumors regular

    Joined:
    May 24, 2009
    #1
    hi friends,

    I want to use AsyncSocket class for peer - to - peer chat. I have been able to make a sample chat application where one user can communicate with other user by transmitting messages to server and then from server to other user(s) by using it, but I am finding it some what difficult to manage sockets established in peer - to - peer chat and getting mixed up in server and client delegates provided by AsyncSocket class when both are implemented at one node.

    I tried to search some sample code over net which uses AsyncSocket class to establish peer -to -peer chat, but unable to find any!

    Moreover, I want to know will it be good to use AsyncSocket class for my requirements (establishing peer - peer chat, video conferencing, voice chat) or there is any better option available?

    Thanks for any help,

    Monaj
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    First you need to figure out a way for peers to find one another, i.e. obtain the IP address of one another. Without that, nothing else matters, because none of the socket libraries, in any form, will know how to establish a connection.
     
  3. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC

Share This Page