Re: Socket Programming on iOS
Re: Socket Programming on iOS
- Subject: Re: Socket Programming on iOS
- From: Jens Alfke <email@hidden>
- Date: Wed, 16 Apr 2014 18:12:12 -0700
On Apr 16, 2014, at 11:42 AM, Dilum Nawanjana <email@hidden> wrote:
> Working as a Client in iOS device is pretty easy. But when it comes to
> Server cocoa framework is not very much handy for that. We have to code
> using basic C language for the implementation.
There are a number of open source libraries that provide support for listener sockets. I recommend the GCDAsyncSocket class, in the CocoaAsyncSocket library.
If you don’t want to add a lot of external source, it’s not too hard to roll your own listener implementation without having to use more than a few lines of C. Take a look at Apple’s CocoaEcho sample code; the EchoServer class shows how to do it.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden