Started to rewrite tcpserver.c to C++