Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Through one router only, will UDP package out of order?

Through one router only, will UDP package out of order?

Scheduled Pinned Locked Moved Windows Forms
question
5 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zipliu
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • Z 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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      Z 1 Reply Last reply
      0
      • D 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

        Z Offline
        Z Offline
        zipliu
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • Z zipliu

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Well, it looks like you're going to have to study up on multicasting then.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          M 1 Reply Last reply
          0
          • D 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 Kreskowiak

            M Offline
            M Offline
            MicroVirus
            wrote on last edited by
            #5

            At any rate, UDP won't guarantee you delivery of a packet, so out-of-order is not your only concern.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups