• 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: CFsockets and speed of execution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFsockets and speed of execution


  • Subject: Re: CFsockets and speed of execution
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 15 Aug 2014 12:59:01 -0700


On Aug 15, 2014, at 12:49 PM, Jeremy Thompson <email@hidden> wrote:

Send answers via cfsocketsenddata

This is going to block until the data is sent. You definitely don't want to do that in a single-threaded app.

Instead, you need to buffer the response data locally, and use kCFSocketWriteCallBack notifications to write data when the socket is clear to send. (It's been literally a decade since I used the CFSocket API; it looks like it doesn't have a low-level write function of its own, so I think you have to use the write() system call?)

—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

References: 
 >CFsockets and speed of execution (From: Jeremy Thompson <email@hidden>)

  • Prev by Date: CFsockets and speed of execution
  • Next by Date: kCFSocketWriteCallBack
  • Previous by thread: CFsockets and speed of execution
  • Next by thread: kCFSocketWriteCallBack
  • Index(es):
    • Date
    • Thread