Network Programming

henryj
Unregistered
 
Post: #1
What's the recommended networking api on OSX? Cocoa excluded, I've looked at OpenTransport and CFNetwork and the docs are appalling for both. What is everyone else using?
Quote this message in a reply
Patrick
Unregistered
 
Post: #2
I used Open Transport when I had to use networking. Apple's Carbon documentation for it is HORRIBLE, but you can still get Inside Macintosh: Open Transport from the Classic section. Quite a good book but only covers up to Open Transport 1.3.
Inside Macintosh: Open Transport, the O.T. technotes and looking up stuff on XTI ( what Open Transport was based on ) managed to do the trick for me Smile

~~

You could also just try using BSD Sockets itself. From what I understand, they have somewhat better performance than Open Transport( which on OS X is just a wrapper on top of BSD Sockets )
check here for a page on BSD Sockets : http://www.ecst.csuchico.edu/~beej/guide/net/html/
Quote this message in a reply
Member
Posts: 177
Joined: 2002.08
Post: #3
And since the BSD socket API is cross-platform and has been around for decades, there are way more tutorials and open-source specialty wrappers and so on for them than for pretty much everything else.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Just go with sockets; your code will be more portable and the docs are good Smile

It's not really all that hard, either.

The best tutorial I've seen: http://www.ecst.csuchico.edu/~beej/guide/net/
Quote this message in a reply
henryj
Unregistered
 
Post: #5
I've done sockets before. I was hoping to find 'the one true OS X way' but I'm not having any luck. CFNetwork seems to be a wrapper for sockets but there are NO docs at all.

The ideal would be a class library that works just like Java's networking stuff. I've just spent the last 2 hours playing with Java and I have a working newsgroup reader. It's just a shame java still looks ugly on OS X.
Quote this message in a reply
Hog
Member
Posts: 151
Joined: 2002.09
Post: #6
maybe you might want to try using distributed objects http://developer.apple.com/techpubs/maco...index.html
Quote this message in a reply
Nibbie
Posts: 1
Joined: 2008.09
Post: #7
have you heard of rendevous? it goes really well with sockets.
Quote this message in a reply
henryj
Unregistered
 
Post: #8
I used Java in the end. Way easier. Apple should ditch Cocoa and concentrate on Java.
Quote this message in a reply
Member
Posts: 204
Joined: 2002.09
Post: #9
Quote:Originally posted by henryj
I've done sockets before. I was hoping to find 'the one true OS X way' but I'm not having any luck. CFNetwork seems to be a wrapper for sockets but there are NO docs at all.


"The one true" Mac OS X way (excluding Cocoa) is to use CFNetwork. I would suggest these over sockets, especially if you want to tap into things like Rendezvous. But if you don't need the extras, just use sockets (that's what I do Smile )

Cheers,
Rocco
Quote this message in a reply
henryj
Unregistered
 
Post: #10
Quote:"The one true" Mac OS X way (excluding Cocoa) is to use CFNetwork.


That's what I was going to use but I couldn't find any docs.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  java network api San_Andreas 1 3,195 May 1, 2008 08:05 AM
Last Post: AndyKorth
  Getting network connection for a specified PID Florian 6 4,988 Dec 23, 2006 03:46 AM
Last Post: Florian
  Ways to Network. BinarySpike 28 12,554 May 10, 2005 07:44 PM
Last Post: kodex
  Network play David 15 7,561 Apr 10, 2003 05:56 AM
Last Post: rvangaal