PDA

View Full Version : Cocoa networking help?


Amorya
06-20-2005, 06:03 PM
I'm after info on cocoa networking. I'm a novice developer (to Cocoa, anyhow) and am trying to learn Cocoa programming by working on a project. This project is a client for a multi-user bell ringing simulator (spec here (http://antz.uwcs.co.uk/wbl_spec)) that a friend is writing.

I'm after what framework to use to take care of the networking. I would ideally like something that I could set listening and then whenever it receives a packet it calls a delegate, or something along those lines. The problem is packets are variable length, so I can't ask it to read for a certain length at a time.

I've looked at Omni's networking framework but it seems to require multithreading. I've also looked at AGKit (http://sourceforge.net/projects/agkit/) which looks ok, but has not been updated for a while.

Is there anything built into Cocoa that I could use? NSFileHandle seems to read to the end of the file each time, not to whatever the packet separator character is (it's probably a \n newline). I have no problem only targetting Tiger if there are some new APIs.

Thanks for your help.

Amorya

Towel
06-21-2005, 02:51 AM
I have no idea, but have you tried searching the Cocoa mailing list archive (http://www.cocoabuilder.com/archive/bydate)?