• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS Boost.Asio

Shrouded

New Member
Joined
Sep 26, 2015
Messages
6
Reaction score
0
Any exact reason why this lib is being used in current project? Since i am new to network programming i was very curious what was the thought process behind chosing an appropriate lib.
 
In C++, boost is the library that you first check for stuff you need, that isn't in the standard library. In fact, some of the boost libraries have been included into the std lib over the years (e.g. boost::thread, boost::shared_ptr). On top of that, ASIO is a very mature library, with well documented API and sensible guarantees and requirements when it comes to thread-safety. It also integrates well with the std library and other boost libraries(ASIO completion handlers can be anything that behaves sort of like a function, for example a coroutine or a custom functor). It is in fact considered so mature that is in the process of being integrated into the standard and will most likely be part of the std library in C++20 (Trip report: Winter ISO C++ standards meeting (Kona), C++17 is complete).

As for the alternatives, I'm not quite sure how the alternatives looked back when the decision in TFS was made, but nowadays, if you want an idiomatic C++ networking library you either choose ASIO, POCO or QT. The last one is super heavy and unless you're using other parts of QT is going to be a pain. I have very little experience with POCO so I can't really say much about it.
 
Back
Top