connect to a server via tcp