Adds client/server connection setup code