implementing a TCP sender and receiver classes in c++