How can I be sure that a UDP message is received?

Answer Posted / sudheer

You have to design your protocol to expect a confirmation
back from
the destination when a message is received. Of course is the
confirmation is sent by UDP, then it too is unreliable and
may not
make it back to the sender. If the sender does not get
confirmation
back by a certain time, it will have to re-transmit the
message, maybe
more than once. Now the receiver has a problem because it
may have
already received the message, so some way of dropping
duplicates is
required. Most protocols use a message numbering scheme
so that the
receiver can tell that it has already processed this
message and
return another confirmation. Confirmations will also have to
reference the message number so that the sender can tell
which message
is being confirmed. Confused? That's why I stick with TCP.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How reliable is udp?

739


Why is udp unreliable?

743


Is tcp or udp better?

716


Is port 8000 a tcp or udp?

787


Which is better udp or tcp?

727


Do I use tcp or udp?

701


What is the advantage of udp over tcp?

845


What are advantages and disadvantages of combining the session presentation application layer in the osi model into one single application layer in internet layer?

7099


Is udp safe?

772


A signal with 300 milliwatts power passes through 10 devices, each with an average noise of 3 microwatts. What is the SNR? What is the SNRdb?

4337


Is tcp or udp faster?

726


What is difference between tcp and udp socket?

750


Is udp better than tcp?

713


Can you send and receive on same udp port?

779


Is tcp or udp better for gaming?

746