Adding switch to make TCP listeners optional

Re-request without merge conflicts for pull request #89 by @ziuchkovski