I made this application using UDP protocol in Qt framework and designed an interface in Qt design page as shown below
When the program runs, push button is pressed and the port number displayed on the screen is connected. And in the direction of the messages from the specified port number, the frame on the screen moves in the form of right, left up or down.