Re: Socket in cocoa
Re: Socket in cocoa
- Subject: Re: Socket in cocoa
- From: Chris Parker <email@hidden>
- Date: Sun, 1 Sep 2002 18:56:32 -0700
On Sunday, September 1, 2002, at 04:25 PM, malcom wrote:
Anyone can tell me how can i make a irc socket in objc (or c)? I need
to know the concepts of it, or a little example to learn; I would to
make a simple irc client.
You've got a few options here:
1) You can use SmallSockets (
http://smallsockets.sf.net/). It's an
Objective C wrapper around BSD sockets.
2) You can create a BSD socket in straight C (there are numerous
examples on the web) and wrap it with an NSFileHandle (this is actually
done in the Picture Sharing example in the 10.2
/Developer/Examples/Foundation directory).
3) You can use CFNetwork - which is a CoreFoundation networking layer
and provides things like SSL support, etc. In the long run, this is
probably the way to go.
If you haven't done any network programming, the best thing to do is to
pick up something like the Stevens "UNIX Network Programming" book, or
John Gray's "Interprocess Communications in UNIX: The Nooks & Crannies"
to see what the ideas are like. After that,
1) probably has the lowest barrier to entry. 2) and 3) have no reliance
on code that isn't already available in OS X. 3) involves more code
than 2) but gives you a lot more control over what's happening.
.chris
--
Chris Parker
Cocoa Frameworks Engineer
Apple Computer, Inc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.