开发者

TCP sockets on Iphone

开发者 https://www.devze.com 2023-02-16 11:04 出处:网络
I have been programming in C and Java for a few years, and I decided to make a project for the iphone. Needless to say the Objective-C syntax is very different from what I\'ve seen and I am having a l

I have been programming in C and Java for a few years, and I decided to make a project for the iphone. Needless to say the Objective-C syntax is very different from what I've seen and I am having a lot of trouble in implementing my idea. I have written a java Client-server program. The client establishes a TCP socket connection and send a string, and the server accepts it and does whatever it needs to with it.

That being said, I have no idea how to implement my pr开发者_运维知识库ogram in objective-C. I know about the AsyncSocket classes...but my biggest problem is that I am not familiar with the syntax. I am in school and I don't have time to fully learn it, so i was hoping someone could give me some help or give me some simple samples which establish a connection so I can learn from them and implement my idea.


If you have experience with BSD sockets, then you can write your socket code in plain C. Objective-C is a superset of C, so anything that works in C will work in Objective-C.


You can use ASIHTTPRequest Framework for your problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消