This is my first foray into UDP socket programming. Without getting into the details of the program, the server basically sends n messages of a set size to the client. I have written and ran the code, and it looks like all my messages are getting through to the client in exactly the order that the server sends them. Does this make any sense? It is my understanding that using UDP, the packets sent are not always delivered and not always delivered in the same order. If so, then why is the client program receiving all of the server messages in the same order and never losing any? I have experimented with different message numbers (e.g. sending 200 or 500 messages) and different message sizes. I am not using threads or anything like that. Just set up a loop for the server to send the packets one by one and the client just waits in an infinite loop to receive them. Insight from the more experienced people out there would be very helpful!
This is my first foray into UDP socket programming. Without getting into the details
Share
UDP is not guaranteed to be delivered or in order. That doesn’t mean that it won’t be, especially in your case where I assume your client and server are on the same machine (or on the same local network).