• 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: Substituting low level BSD stuff with spiffy Cocoa calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Substituting low level BSD stuff with spiffy Cocoa calls


  • Subject: Re: Substituting low level BSD stuff with spiffy Cocoa calls
  • From: Brendan Younger <email@hidden>
  • Date: Wed, 15 Dec 2004 00:26:03 -0600

As a side note to this discussion, there really ought to be some sort of threaded IO architecture that's standard in, say, Cocoa or CoreFoundation. Most of the Obj-C socket wrappers use CFSocket nowadays, but many of them, AsyncSockets included, need to bend over backwards a little to keep data flowing (and not block!) while attached to the main run loop. I have yet to see an open-source alternative which has taken the plunge and created its own IO threads [1]. This is probably due to the fact that, in order to do so, you really need to write a lot of supporting code to get thread-safe queues (sure CFArray has some heuristics to determine when its being used as a deque, but if you know ahead of time that you're going to be using it as such, you can do a little better) and write some non-trivial code to message run loops (not necessarily the main run loop so -[NSObject performSelectorOnMainThread:etc.] is out). In short, there really is a need for an updated MiscKit for the community. The Omni groups frameworks are great, but there's a LOT of stuff in there which is IMHO a bit over-engineered and a little crufty. Anyone else feel the same way? Should we create a new MiscKit, or just keep using nifty classes from all these different authors?

Brendan Younger

[1] I say open-source because I wrote a threaded socket class for my company which has quite a bit of supporting code. (It's all fun and games until you want your threads to not retain the socket class.) Perhaps one day it'll become open-source, but I wouldn't hold my breath.

On Dec 14, 2004, at 11:42 PM, Steven Palm wrote:


On Dec 14, 2004, at 11:09 PM, Malte wrote:
I'm currently trying to set up a little "networking-testing-cocoa-app". I've plowed through the net finding countless tutorials about
BSD sockets but oddly enough not one "clean objective-c/cocoa"-networking tutorial. :(

Check out the AsyncSockets stuff, it is very easy to use and feels VERY "Cocoa".


http://homepage.mac.com/d.j.v./FileSharing9.html

_______________________________________________ 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: 
 >Substituting low level BSD stuff with spiffy Cocoa calls (From: Malte <email@hidden>)
 >Re: Substituting low level BSD stuff with spiffy Cocoa calls (From: Steven Palm <email@hidden>)

  • Prev by Date: Re: cross development on Jaguar
  • Next by Date: Getting Pixel values of an image
  • Previous by thread: Re: Substituting low level BSD stuff with spiffy Cocoa calls
  • Next by thread: Re: Substituting low level BSD stuff with spiffy Cocoa calls
  • Index(es):
    • Date
    • Thread