added tcp/udp selection to transmit