Re: Best practices for GCD-based socket I/O with SSL support?
Re: Best practices for GCD-based socket I/O with SSL support?
- Subject: Re: Best practices for GCD-based socket I/O with SSL support?
- From: Jens Alfke <email@hidden>
- Date: Mon, 13 Apr 2015 14:50:54 -0700
Well crap, I was happily ripping out the background-thread-runloop code from the 3rd party network library I’m using, when I ran into a case I can’t get rid of. The library implements a listener socket to accept incoming TCP connections, and it uses CFSocket for it. To schedule that it uses CFSocketCreateRunLoopSource and CFRunLoopAddSource. I can’t find any alternatives to schedule a CFSocket on a dispatch queue (nor would I expect to, since I know CFSocket is a pretty ancient API.)
There’s probably an alternative way to run a listener/server socket, which could be scheduled on a dispatch queue, but I’m not too handy with BSD network APIs and I’ve never looked at dispatch_io. Anyone got any sample code or snippets?
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden