Re: UDP SOCKETS!!
Re: UDP SOCKETS!!
- Subject: Re: UDP SOCKETS!!
- From: Douglas Davidson <email@hidden>
- Date: Mon, 14 Feb 2005 10:39:26 -0800
On 2005-02-13 22:29:52 -0800 apr trainees <email@hidden>
wrote:
Hi,
i've started working on cocoa recently.
i need to ask 2 things:
1. what are the various ways in which i can implememnt udp sockets in
cocoa?
I have heard of the following:
use small sockets
netsocket
async socket
cfsocket
i have worked extensively with c.can we use the unix bsd sockets "as
it is"
also?
i.e use sockets .h and open(),read(),write,bind(),close() etc calls
DIRECTLY?
for a new programmer which one would be good and what are the pros
and cons?i
got diff sites suggesting diff things.so slightly confused.
You can definitely use the BSD socket APIs directly. If you are
familiar with these APIs, you may never find it necessary to use
anything else for your networking. However, in Cocoa there is an
important concept known as the run loop, whose interfaces are
CFRunLoop in CoreFoundation and NSRunLoop in Foundation. It is
frequently convenient to be able to integrate network sockets so that
they can serve as sources in a run loop, and the point of CFSocket is
to provide a thin wrapper around BSD sockets that permits them to do
just that. CFSocket is fairly low-level, and leaves many socket
operations to be performed using the BSD socket APIs. Those who would
like a higher-level abstraction can use one of the frameworks noted in
the review articles that you have probably been looking at.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden