> UDP datagrams unlike TCP packets are NOT
> guaranteed to be delivered across a network.
Douglas,
Well, even TCP packets are not guranteed, e.g. if I cut your cable
😉My suggestion for UDP was tied to the sentence "Does it matter if data is missed?". If this is the case, UDP is much more fault tolerant, because it is stateless. For example given a simple weather station sending a packet with time and temperature every second. Missed packets can easily be interpolated or treated as missing (put a sequence number in the packet and you'll know how much you're missing). UDP is better in this case!
If you would implement this in TCP, you need to establish a connection, lost packets will be retransmitted, and if the connection breaks down o
r is really flakey all these retransmissions compound the problem. If one side reboots, a new connection must be established from scratch.
Using UDP, each side can restart and simply join the party again. You can add some statefulness using a second UDP channel to communicate current operation status. UDP data can even be sent to the subnet broadcast address with the following two advantages:
(1) Any node can listen in, e.g. several monitoring nodes can display the same ongoing data.
(2) Nodes that are not listening, will not return ICMP(3,3)packets, but simply ingore broadcasts.
In any case, if it brings down the entire network, it is probably due to a coding error and not due to choice of IP protocol. I could easily write you a SYN-flooder that brings down the entire network (DoS attack) using only TCP.