I'd just have one for TCP and one for UDP and avoid the boolean parameter (which is also defaulted so if you aren't aware of the difference it'll silently fail).