Why do I get UDP datagrams out of order even with processes running locally?

后端 未结 4 1870
后悔当初
后悔当初 2020-12-07 00:58

I\'m developing a java interface between a streaming server and a flash client. I noticed that UDP datagrams can reach my interface out of order even if both processes are r

4条回答
  •  难免孤独
    2020-12-07 01:59

    Actually there are no guarantees of ordering and reception about UDP packets, even if they are sent by localhost on localhost. Just because the specification of the protocol doesn't imply anything about it.

    Since you can't make assumptions on them you should choose to use TCP or handle reordering by using a sequence number handled by your programs..

提交回复
热议问题