Through one router only, will UDP package out of order?
-
Hi Everyone, In Windows OS, if I used UDP protocol to transfer data through only one router (one path), is there a possibility that the packages are out of sequence on the receiver side? For my application, I want to stay with UDP. I just wonder if I need buffer the data and re-order them on the receiver side. Thanks a lot! zipliu
-
Hi Everyone, In Windows OS, if I used UDP protocol to transfer data through only one router (one path), is there a possibility that the packages are out of sequence on the receiver side? For my application, I want to stay with UDP. I just wonder if I need buffer the data and re-order them on the receiver side. Thanks a lot! zipliu
Yes, it's possible, but highly unlikely. This would be due router misconfiguration, possible buffering issues inside the router, memory failure in the router, ... It's not just the router that can cause problems. You can also run into issues with switches causing problems where packets would drop or misroute. If you really are worried about packets arriving in the wrong order, use TCP. You're making the huge mistake of coding your app to fit a specific network configuration. Don't! How long is it going to be before another router or switch is added to the network? How about if the company moves locations and reconfigures the network for a new location??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Yes, it's possible, but highly unlikely. This would be due router misconfiguration, possible buffering issues inside the router, memory failure in the router, ... It's not just the router that can cause problems. You can also run into issues with switches causing problems where packets would drop or misroute. If you really are worried about packets arriving in the wrong order, use TCP. You're making the huge mistake of coding your app to fit a specific network configuration. Don't! How long is it going to be before another router or switch is added to the network? How about if the company moves locations and reconfigures the network for a new location??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hi Dave, Thanks a lot. I will consider that. The reason for me to stay with UDP is that I will need to broadcast the message to multiple PCs. Using TCP, it takes more efforts to do so. Thanks. zipliu
Well, it looks like you're going to have to study up on multicasting then.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Well, it looks like you're going to have to study up on multicasting then.
A guide to posting questions on CodeProject[^]
Dave KreskowiakAt any rate, UDP won't guarantee you delivery of a packet, so out-of-order is not your only concern.