I am trying to learn network programming with C++, the portable way(not sticking to any particular OS). I asked in my previous question about a good portable networking library and experts(SO users) suggested of Boost::Asio and POCO.
Recently I stumbled back on cURL( I had heard about it, but forgot that there’s something like that ). I know its a multi-protocol file transfer library, but isnt that what can be done with networking libraries?
My question is what is the usage of cURL? Is it another network library? If yes, isn’t it good? Why no one suggested Curl? And if no, when to use it compared to networking libraries like Boost::Asio and POCO?
cURL is primarily for dealing with URIs/URLs. URLs are mostly used for networking, but at least in theory that’s more or less incidental to cURL. Although it’s probably not terribly common to do so, if you wrote a program that only dealt with local files, but did so using
file://URLs, cURL would work fine for manipulating those local URLs.Boost ASIO has infrastructure for doing networking, but nothing to work directly with URLs. Other parts of Boost include things like string handling that would probably be handy in building URI/URL handling, but as far as I know nothing that’s specific to manipulating URIs/URLs.
POCO is a full-blown networking library, which does also include URI handling, but isn’t devoted (anywhere close to) exclusively to it.