add udp connection function