• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best practices for GCD-based socket I/O with SSL support?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Best practices for GCD-based socket I/O with SSL support?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
References: 
 >Best practices for GCD-based socket I/O with SSL support? (From: Jens Alfke <email@hidden>)
 >Re: Best practices for GCD-based socket I/O with SSL support? (From: Marc Krochmal <email@hidden>)

  • Prev by Date: Re: Best practices for GCD-based socket I/O with SSL support?
  • Next by Date: Re: Can't get remote host and port after CFStreamCreatePairWithSocketToNetService
  • Previous by thread: Re: Best practices for GCD-based socket I/O with SSL support?
  • Next by thread: Re: Best practices for GCD-based socket I/O with SSL support?
  • Index(es):
    • Date
    • Thread