TcpClient coding

Add some functions for TcpClient, to be continued.