add log.cpp
finish tcp client with c++