Bosh connection manager in C++