[Gllug] [OT] Lost packets
t.clarke
tim at seacon.co.uk
Thu Jul 2 15:05:28 UTC 2009
UDP packets are essentially unreliable.
Use TCP instead ??
Or maybe -
1) send the packet with both a sequence number and and 'retransmit counter'
set to zero
2 recipient processes the packet
3) recipient sends back an acknowledgement with the sequence number
4) if sender does does not receive an acknowledgment within a certain
time send the packet again with an incremented retransmit counter
5) if recipient has already seen the packet discard it, otherwise process
6) recipient sends acknowledgment again regardless of whether processed
or not
7) Once the sender sees an acknowledgment it can carry on to the next packet..
There may well be loguic flaws in this arrangement however !!!
In tghe above scenario the sender cannot send another packet until the
current one has been acknowledged. Some kind of error function would be needed
to sound an alarmn if more tghan N packets in succession fail to be delivered.
There are are of course more sophisticated techniques involving sliding
windows (which I believe if what TCP does transparently) to ensure maximised
thoughtput/minimised latency. Depends on the application requirements I guess!
Tim
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list