Downloading HTTP URLs asynchronously in C++

后端 未结 4 1892
轮回少年
轮回少年 2020-12-18 09:23

What\'s a good way to download HTTP URLs (e.g. such as http://0.0.0.0/foo.htm ) in C++ on Linux ? I strongly prefer something asynchronous. My program will have an event l

4条回答
  •  忘掉有多难
    2020-12-18 10:25

    Qt's QThread instance when run can have it's own event loop. Insides QThread you can have an instance of QHttp and since QHttp uses Qt Event loop to function you have your async Http calls from mail thread. Also note that inter thread communication is very easy.

    Head straight to http://doc.qt.nokia.com and look at the classes's documentation to understand better.

提交回复
热议问题