[erlang-questions] gen_udp:send blocks?

Roger Lipscombe roger@REDACTED
Fri Sep 7 15:00:01 CEST 2018


On 7 September 2018 at 12:37, Valentin Micic <v@REDACTED> wrote:
> On 07 Sep 2018, at 12:11 PM, Roger Lipscombe wrote:
>> My question is more about understanding the semantics of gen_udp:send:
>> why is it blocking? If the buffer was full, I'd expect it to discard
>> the message and return immediately.
>
> UDP should behave the way you expected. May I ask if the caller of gen_udp:send is the owner (e.g. creator) of the socket?

Yes it is. I call gen_udp:open in Module:init/1, and gen_udp:send in
Module:handle_cast/2.

Oh. Here's a thought: we use a hostname as the destination in
gen_udp:send. Could that be causing blocking?



More information about the erlang-questions mailing list