[erlang-questions] Return status of gen_udp send

Torben Hoffmann <>
Mon Jun 4 09:33:42 CEST 2012


You cannot make any assumptions about how often the missile hits.
What you know for sure is that you will not be notified about the 
success or failure.

 From the Wikipedia entry on UDP:
> UDP uses a simple transmission model without implicit handshaking 
> dialogues for providing reliability, ordering, or data integrity. 
> Thus, UDP provides an unreliable service and datagrams may arrive out 
> of order, appear duplicated, or go missing without notice. UDP assumes 
> that error checking and correction is either not necessary or 
> performed in the application, avoiding the overhead of such processing 
> at the network interface level.
So you have to think about how to deal with this.

UDP is similar to message passing in Erlang, you cannot be sure that a 
message is received, but unlike UDP, you can be sure that there are no 
duplicates and that messages arrive in order (but you cannot be 
guaranteed that the receiver processes them in order).

Cheers,
__
/orben



On 02/06/2012 12:24, Wojtek Narczyński wrote:
> On 2012-06-02 09:39, Torben Hoffmann wrote:
>> Tim, you are correct about the 'fire and forget', but that is only 
>> for the part outside your own machine.
>
> Really?
>
> I always thought that in 'fire and forget' you can forget exactly 
> because the missile is (almost) guaranteed to reach its target.
>
> Silly me.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-- 
http://www.linkedin.com/in/torbenhoffmann




More information about the erlang-questions mailing list