Re: CFsockets and speed of execution
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