Talk About Network

Google





Mac > Mac Programmer > Threaded Networ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1039 of 1043
Post > Topic >>

Threaded Networking sample code

by spamfalle2@[EMAIL PROTECTED] (Marc Stibane) Oct 1, 2008 at 04:36 PM

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?


P.S. I just asked this question at stackoverflow also:
   http://stackoverflow.com/questions/157827/

-- 
In a world without walls and fences,
   who needs windows and gates?
 




 1 Posts in Topic:
Threaded Networking sample code
spamfalle2@[EMAIL PROTECT  2008-10-01 16:36:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 22:58:56 PST 2009.