C++ Buffer class designed for sending data over a network