• 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: Managing Multiple Connections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing Multiple Connections


  • Subject: Re: Managing Multiple Connections
  • From: James Matthews <email@hidden>
  • Date: Wed, 21 May 2003 12:45:26 -0400

At 9:03 AM -0700 5/21/03, Becky Willrich wrote:
The usual way to arrange for cross-thread communication in this model is to build a custom run loop source (see CFRunLoop.h; this isn't as hard as it sounds) and install it on the run loop as well. When you want to communicate something to the connection thread, you signal the custom run loop source; that will cause its signal callback to be called on the connection thread.

Would another approach be to create a pair of anonymous UNIX domain sockets with socketpair(), and call CFStreamCreatePairWithSocket() to hook them up to CFReadStream and CFWriteStream objects? That would save the trouble of building a custom run loop source -- are there reasons why the custom source would be preferred?

Thanks,
--
Jim Matthews
Fetch Softworks
http://fetchsoftworks.com
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Managing Multiple Connections (From: Dietrich Epp <email@hidden>)
 >Re: Managing Multiple Connections (From: Becky Willrich <email@hidden>)

  • Prev by Date: Re: Managing Multiple Connections
  • Next by Date: Re: Managing Multiple Connections
  • Previous by thread: Re: Managing Multiple Connections
  • Next by thread: Re: Managing Multiple Connections
  • Index(es):
    • Date
    • Thread