My application need to download several web-pages simultaneously and i know this is possible in a single thread because of experience with epoll programming in linux. Currently i use CURL to interact with HTTP but…
update: Discovered the curl’s MULTI-interface: http://curl.haxx.se/libcurl/c/libcurl-multi.html I think question is resolved (-;
The cross-platform way is to use
selectorpollwhich are specified by POSIX.Alternatively, and more efficiently, you could use a library. The main advantage of a library is that it can do things way more effectively than
select, by employing system-specific mechanisms.For example, a nice network library would probably use:
epollon Linuxkqueueon FreeBSD/dev/pollon solarispollseton AIXiocpon Win32I think you can use
asiofor C++ orlibeventfor C.