Yet more cleanup to TCP logic, this time adding a master switch and adding UDP preference in send().