add udp open in main.cpp