Use uint16 for udp port.
Fixed sending messages via tcp.