Before 2013rx I was sticking to Carbon, and on a Mac I had to poll http sockets to get the events to fire. If I do that under Carbon I eventually get a crash in the .poll, but with Cocoa under “normal” circumstances the events seem to fire nicely by themselves and I am no longer polling. I have an app that takes in commands via http socket and then occasionally triggers a treaded file copy based on the contents from the http socket. Before starting the file copy the socket is very responsive, but once I start the threaded copy (I am not using .copyto, but instead .read/.write in blocks) the http socket does not seem to be getting serviced and my receiveprogress event rarely get fired, sometimes for many seconds, even though I know the host at the other end is sending data. I think this is about http sockets because I have timers to update my GUI and those slow down a little during the copy but fire many more times than the .receiveprogress event. The CPU usage is also pretty low during all of this. It makes no difference if I set the priority of the copy thread as well. I am hesitant to start throwing in polling again based on crashes under Carbon. (and no, I have not filed that as a bug report yet)
Open to ideas or suggestions for different methods to keep things responsive.
tf