Allow TCP and UDP listening to be configurable