Socket HELP!!! (in cocoa)

stereoboy20

Registered
Hi. I'm absolutely new to cocoa. The thing is that I'm trying to write a MSN/Messenger clone in cocoa (I hate Microsoft's pitiful carbon messenger) and I find a problem... I have no idea of what classes I can use for connecting to the server! I guess NSSocketPort is the one, but it's absolutely undocumented. What can I do!!!

BTW, help is welcome. It will be open-source but not GPL (I hate GPL almost as much as I hate carbon...), maybe Artistic License or something similar to the smallSprockets license.
 
If it's the documentation included with the devtools that doesn't mention NSSocketPort, go to Apple's Foundation docs as they recently updated them. There's also the PDF at that location.
 
Ok, got the Socket. How do I read from and write to the socket? May be a stupid question, but I have only programmed sockets in Java and REALbasic before, so... don't have a clue.
 
After messing around with Apple's sockets for a while and feeling it was way too much work, I moved to SmallSockets. Much faster and easier (in my opinion) to work with, and I can't imagine it wouldn't be suitable for your application.

SmallSockets is available from http://smallsockets.sf.net and is fairly small, so it doesn't add to your finished app's filesize too much.

If you're curious (don't know if you've worked much with sockets before), SmallSockets basically just wraps BSD sockets. Works very nicely.
 
Back
Top