C++/TCPSocket: Fix some bug