Created basic server connection code.