My code needs to run all networking routines in a separate NSThread. I have got a library, which I pass a callback routine for communication:
my thread code
library
my callback (networking)
library
my thread code
My callback routine must POST some data to an HTTP server (NSURLConnection), wait for the answer (start a NSRunLoop?), then return to the library.
The library then processes the data.
After the library returns to my thread, I can then post a notification to the main thread which handles drawing and user input.
Is there any sample code covering how to use NSURLConnection in a NSThread?