OS X Networking Programming

Discussion in 'Mac Programming' started by Soulstorm, Feb 27, 2008.

  1. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #1
    I finally reached a stage, where I think I need something new to go on in my programming life. I decided to make an application that takes advantages of simple networking features of OS X.

    A simple application I want to make is an IRC Client, or at least a simple chat program that can send messages between 2 different computers. That is an example of the type of a networking program

    But I am really stuck. How do I begin? What technologies I need to know? I am fairly proficient in C++, and have great experience with Cocoa and ObjC. Any recommendations, or technologies I will need to take a look at?
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Look into socket programming.

    http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html

    Here is the RFC of the IRC specification which you will need to know.

    http://www.irchelp.org/irchelp/rfc/rfc.html
     
  3. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #3
    There are several good Cocoa classes for networking. Check out SocketClasses on CocoaDev. I'd suggest AsyncSocket.
     
  4. macrumors regular

    x704

    Joined:
    Apr 15, 2006
    #4
    I started a simple IRC API in Objective-C; its still not quite halfway done. I'm not using the Cocoa framework as I want to keep it platform independent. Eventually when I finish the API a bot will soon follow. Text parsing in C stinks.. heh

    Anyway, I'm just using sockets in C with TCP then wrapped up in nice classes in Objective-C. Eventually I will add support for more than one connection, but gotta get the parsing properly working first :/

    You might check out Xchat-aqua, its open source... http://sourceforge.net/projects/xchataqua/
    And don't forget the IRC protocol: http://www.irchelp.org/irchelp/rfc/rfc.html

    I'm almost ashamed to show my code (lol); still has much that needs to be done, but https://launchpad.net/libobirc if you really want to glance.
     
  5. thread starter macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #5
    Thank you all for your answers. I considered taking a look into X-Chat, but I wasn't sure if that used the method I am willing to use. I think that simple BSD sockets will be fine for me. I will stick at that atm, till I need more.
     

Share This Page