[erlang-questions] two gen_udp questions

Micha micha-1@REDACTED
Sat Aug 8 20:21:00 CEST 2009


On Saturday, 8. August 2009 19:31:31 Kaiduan Xie wrote:
>
> 1. Open the socket in the init function of gen_server.

o.k.

> 2. The incoming message will be handled in handle_info().
>
> handle_info({udp, Socket, IPtuple, InPortNo, Packet}, State) ->

ah thanks, that info was good :-)

> 3. Either way will work.

o.k., can't there be a race condition, if multiple threads want to send data 
over the socket?

thanks
 Michael



More information about the erlang-questions mailing list