I'm currently working on a homework assignment in one of my classes, and I'm having some trouble with it. I am supposed to make a multithreaded messaging program that allows users to connect using both TCP and UDP. The messaging program works perfectly when TCP is selected. However, I do not have a clue to how to integrate UDP into my program. I have written a multi-threaded client and server for UDP, and it works fine. I do not know how to integrate UDP into this program, and I was wondering if anyone could help me. Here is what my program is supposed to start:
"Ex. Start Server program listening for both TCP/IP and UDP client applications. When starting the server, it will display what the IP address is for TCP/IP communications and the port it is listening on. Next, the 1st client program is started. The user is prompted for connecting to the server via TCP/IP or UDP. "
To start my program, I've made it so that you first start the server GUI through the command window, then start the client GUI.
I've posted my code on pastebin, so it'll be easier for people to help me. Thank you! Here are the links:
P.S.: Sorry if my code wasn't commented!