My program currently opens a UDP socket, and sends out a UDP message with it (naturally). It then receives a UDP message back. All is good. But every now and then, the remote computer will send back some TCP data to me, and completely forget UDP. How should I set up my socket to receive data in either protocol? Also, if I don't know what protocol the incoming data is being sent with, then how do I know if I received all of it? (UDP only sends one message, but TCP will send an unknown multiple amount)