build tcp client for server