changed error reporting to specify tcp/udp