-1

Is there an example where I am able to do overlapping HTTPS requests while getting the returned results as they arrive. Language which supports threads to do this?

Any examples of this would be much appreciated!

Thank you.

iCeR
  • 77
  • 1
  • 6

1 Answers1

0

curl multi-request functionality may be useful in this case. The example is with regular http but should work with https too. If you need to process data as they come, use curl's write handler functions set by CURLOPT_WRITEFUNCTION option.

StasM
  • 10,593
  • 6
  • 56
  • 103
  • won't that block all transfers? http://comments.gmane.org/gmane.comp.web.curl.library/30199 – iCeR Dec 31 '10 at 05:47
  • @iCeR: for the length of write being executed, yes. Do you plan to do something long inside write? You can just store the content or process it - it shouldn't take you long... Also, network receive buffers should still work IIRC, just no parallel data processing. If you do need parallel processing, then you need threads. – StasM Dec 31 '10 at 05:59
  • Yup need threads. Do you have an example by any chance for what I'm trying to achieve? Thanks for the help! – iCeR Dec 31 '10 at 19:30