• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UDP SOCKETS!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >UDP SOCKETS!! (From: apr trainees <email@hidden>)

  • Prev by Date: Re: Newbie
  • Next by Date: Re: adding contextual menu items to an NSTextView subclass menu
  • Previous by thread: Re: UDP SOCKETS!!
  • Next by thread: Re: UDP SOCKETS!!
  • Index(es):
    • Date
    • Thread