how to make a connection between Macs

Discussion in 'Mac Programming' started by Howiieque, Mar 15, 2009.

  1. macrumors regular

    Joined:
    Feb 1, 2009
    #1
    I want to write an app send text between two macs like the msn do. I just want to learn how to do so and learn something about network. what should i learn to implement this task? and which classes can facilitate things?
    and what if connect to a windows?
     
  2. macrumors 68030

    Joined:
    Oct 31, 2006
    #2
    I wrote soemthing exactly like this just last year in one of my programming classes. I'd look into C with emphasis on pipes
     
  3. thread starter macrumors regular

    Joined:
    Feb 1, 2009
    #3
    could you give a little more hints, about pipe?
    and it seems that socket can do this thing, is there another option?
     
  4. macrumors 68030

    Joined:
    Oct 31, 2006
  5. macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #5
    Cocoa distributed objects is also a nice way to do this.
     
  6. thread starter macrumors regular

    Joined:
    Feb 1, 2009
  7. macrumors 68020

    Krevnik

    Joined:
    Sep 8, 2003
    #7
    Yeah, there are two ways to do this:

    BSD Sockets
    Cocoa Distributed Objects

    Either one will work. If you intend to make this app multi-platform in the future (Beyond iPhone and Mac), then I'd look into BSD Sockets. Otherwise distributed objects should be just fine.
     
  8. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #8
    These tutorials related to bonjour may be helpful to you:

    Part 1
    Part 2
     
  9. macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
    #9
    Java's the easiest way to go. Give Java sockets a try.
     
  10. thread starter macrumors regular

    Joined:
    Feb 1, 2009
    #10
    Thank you for given all the information.
    Sockets and distributed object are both what i want to learn, although i just heard of them and don't know what they exactly are.
    And then i want to Windows join in by using Java.
     
  11. macrumors 68020

    Krevnik

    Joined:
    Sep 8, 2003
    #11
    Yup, look at sockets.

    It will require more work on your part, but the code will be more portable. The same basic concepts will apply on any Unix-like system, Windows, Java, OS X, and so on.

    It will also give you a bit more fine control over the data sent.
     

Share This Page