English 中文(简体)
Failure scenarios for reliable UDP?
原标题:

What could be good list of failure scenaros for testing a reliable UDP layer? I have thought of the below cases:

  • Drop Data packets
  • Drop ACK, NAK Packets
  • Send packets in out of sequence.
  • Drop intial hand shaking packets
  • Drop close / shutdown packets
  • Duplicate packets

Please help in identifying other cases that reliable UDP needs to handle?

问题回答

The list you ve given sounds pretty good. Also think about:

  • Very delayed packets (where most packets come through fine, but one or two are delayed by several minutes);
  • Very delayed duplicates (where the original came through quickly, but the duplicate arrived after several minutes delay);
  • Silent dropping of all packets above a certain size (both unidirectional and bidirectional cases);
  • Highly variable delays;
  • Sequence number wrapping tests.

Have you tried intentionally corrupting packets in transit?

Also, have you considered a scenario where only one-way communication is possible? In this case, the sending host thinks that the send failed, but the receiving end successfully processes the message. For instance:

  1. host A sends a message to host B
  2. B successfully receives message and replies with ACK
  3. ACK gets dropped in the network
  4. A waits for timeout and re-sends message (repeats steps 1-3)
  5. host A exceeds retry count and thinks the send failed, but host B has in fact processed the message

I have thought UDP is a connectionless and unreliable protocol and that is does not require and specific transport handshake between hosts. And hence there is no such thing as a reliable UDP protocol.





相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

Listen to a port that is in use [duplicate]

Possible Duplicate: Get connecting IP from specified ports that using by other program. If a port is used by a program, is there any way I can listen that port and get the connected IP on that ...

Twisted Spread suitable for multiplayer racing sim?

Do you think that Twisted Spread may be suitable (in terms of performance) for a multiplayer racing simulator? The rest of the application is based on Python-Ogre. Can Perspective Broker run upon (...

Optimizing a LAN server for a game

I m the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

热门标签