connect server and client