CFSocket and General Networking Question
I need some serious advice. I have been trying to get this to work for DAYS, and have scoured every resource I can find, even Apple's documentation, with no luck.
Here is my problem: I need to network a Mac and an iPhone and be able to "write messages" back and forth, from one to the other (both ways.)
I have looked at everything from NSSocketPort to CFSocket. I cannot find any valuable resources that tell me how to do this.
I am currently thinking that a CFSocket would be the best option.
Here is what I think I need to do:
1) Create a "server" on the iPhone (I don't know how to do this...)
2) Create a Bonjour service, and start searching on the Mac
3) When it attempts to connect...I get lost.
I have had a lot of experience programming networking in Java (with ObjectOutputStreams and ObjectInputStreams, etc.), but nothing in Objective-C or C.
Also, please don't just point me towards an open-source package. This is something I want to learn and understand...
THANK YOU!
|