ios - CFNetwork - Multiple Connections, Same Server? -


i'm trying create multiple connections same server (e.g. https://www.myserver.com/) using cfnetwork framework. works expected when try make single connection. try adding second concurrent connection, second connection hangs , waits first finish.

i've tried adding following code "tag" streams unique ids (prior opening stream):

//self.httpreadstream nsinputstream //self.requestid nsnumber<unsigned long long> increments every new request cfreadstreamsetproperty((cfreadstreamref)self.httpreadstream, cfstr("streamtag"), (cfnumberref)self.requestid); 

i got idea here: apple mailing list: overlapping requests on multiple persistent connections?

unfortunately, not work.

please help. how can achieve multiple concurrent connections same server (host/port) cfnetwork framework? please note, i cannot use nsurlconnection number of complicated reasons (outside scope of post).

update1:

to clarify. if try make 2 concurrent requests same server (https://www.myserver.com) using cfnetwork apis (each request own thread , runloop -- provided nsoperation), first request connects , transfers data, second request gets queued behind first until first complete (the nsoperationqueue set manage 4 concurrent operations).

both not transfer data @ same time same server. can, however, make multiple concurrent request if servers different (different host names, https://www.myserver0.com/, , https://www.myserver1.com/)


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -