[erlang-questions] UDP concurrent server
Wed Dec 9 12:59:38 CET 2015
On Wed, Dec 9, 2015 at 11:07 AM Bogdan Andu <bog495@REDACTED> wrote:
> following the thread
> as it seems that POSt to topic does not work
> After more tests the basic questions that remains ..
> Is there a way to have more than one process be blocked
> in gen_udp:recv/2 call as this seems to not be possible,
> probably because the way udp sockets work.
> Sequentially works as expected, but when when I try to spawn another
> that makes and attempt to execute gen_udp:recv/2 while the first process
> already does
> gen_udp:recv/2 , the second process gives elready error. This means that 2
> cannot concurrently do gen_udp:recv/2 .
You can if you tell to the udp socket to reuse the port:
If you do this any process will be able to reuse it and send/recv to it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions