An application level protocol implementation in C++