set connection to server