add some functions to client class, and finished connection thread, and in_connection