0

I wanna implement a chat application. When i gone through few threads and tutorials, i think i need to use socket programming for this purpose. Can anyone provide some basic idea for socket programming in iphone.And what all things i have to refer for famliarizing with socket programming.

Thanks and regards, Sreelash

Sreelash
  • 1
  • 1
  • 2

2 Answers2

2

I think the AsyncSocket might make things easier for you, would save you from having to use the Core Foundation stuff directly.

Jorge Israel Peña
  • 36,800
  • 16
  • 93
  • 123
  • What about the CFNetwork framework. Whats this AsyncSocket. Can you just brief about it? – Sreelash Aug 27 '10 at 05:46
  • Sure. I haven't used AsynSocket myself, but basically, it's a wrapper for all of that CF (Core Foundation) networking stuff. This allows you to work in Objective-C as with the rest of your code, instead of mixing your code with the pretty confusing C language Core Foundation stuff directly. In other words, the functionality of what you would normally use directly (CFNetwork, CFSocket, etc.) is wrapped in Objective-C. – Jorge Israel Peña Aug 27 '10 at 05:51
  • Hi Blaenk, I have found a documentation for AsyncSocket(http://homepage.mac.com/d_j_v/.Public/AsyncSocket4.3/AsyncSocket%20Documentation.html). In this doc, they have only specified the delegate methods for using AsyncSocket. It would be better if i got some working samples of AsyncSocket. Do you have any? Regards, Sreelash – Sreelash Aug 29 '10 at 04:23
  • There are some example projects in the trunk directory of the subversion repository for the project. They include sample implementations and code for the delegates: http://code.google.com/p/cocoaasyncsocket/source/browse/#svn/trunk – Jorge Israel Peña Aug 29 '10 at 04:31
  • Links mentioned over here are not available now – Murali Apr 28 '17 at 06:46
0

try this click here you can get how to send and receive message using socket programming. you have to use node.js at server side..

Mitul Bhadeshiya
  • 1,280
  • 1
  • 12
  • 32