Re: Need help in Mac Networking.
Re: Need help in Mac Networking.
- Subject: Re: Need help in Mac Networking.
- From: Troy Dawson <email@hidden>
- Date: Sat, 2 Oct 2004 13:54:51 -0700
On Oct 2, 2004, at 1:17 PM, Kent Sorensen wrote:
CFNetwork etc. has miserable documentation but socket programming is
very well known. Stevens UNIX network programming book is the bible.
And complete overkill for the casual programmer just trying to get two
machines talking to each other.
I dislike the fiddly nature of CF (as compared to the cleanliness of
Foundation), so for working on a LAN I would prefer going with
Distributed Objects from Cocoa's Foundation classes.
I've tested Chris Kane's code from:
http://www.cocoadev.com/index.pl?DistributedObjectsSampleCode
and found it works fine on my LAN (it wasn't able to punch through my
firewall any better than my other code tests in CF and BSD sockets,
however).
If getting into Objective-C is too much for the coder, perhaps the
NetSocket code from:
http://www.blackholemedia.com/code/
would be a better approach.
BSD sockets is fine if you've already got working code, but building a
working example from scratch is basically an exercise in how to
program, 70's style. Yuck.
So the choices are:
1) Distributed Objects
Requires getting into Objective-C/Objective-C++, AFAIK relatively
untested, but pretty easy to set up and use.
2) CFSockets
Fiddly, but saner than 3). Requires getting into the new event model of
Carbon (CFRunLoops etc)
3) BSD Sockets
Greater compatibility with eg. Winsock and other non-Mac systems, lots
of code out there to steal and learn from, which is good because it is
a horribly anti-user API.
4) OpenTransport and other Carbon solutions.
Don't know / don't care.
=td=
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden