UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2002-07-26 11:39 PM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 352

Re: 5.5 - How can I be sure that a UDP message is received?

6

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.

From: Paul Beardsell

You need an acknowledgement from the receiver.

From: flair

use the Sliding Window algorithm

From: Min

write an echo() function to echo your confirm message in your server

Offline

Board footer

Powered by FluxBB