Basic skeleton of the API. GenEvent based connection event handlers may not be the best way to do this