Attempt to connect with the server.