Tue Feb 17 16:57:37 CET 2009
Why not use plain gen_tcp:accept() and then gen_server:enter_loop() ?
With an accept timout you can fall out and poll for mailbox messages and get
back into trying to accept again, making it semi-active.
About prim_inet being safe to use, what I have picked up pretty clearly from
OTP is that if-it-isnt-documented-it-should-not-be-depended-on.
On Tue, Feb 17, 2009 at 16:49, Nicolas Thauvin <>wrote:
> prim_inet:async_accept/2 looks like a very interesting function to use in
> a gen_server. However, it is not documented.
> Several examples on the Internet already use it (like
> Questions are:
> - Why isn't it wrapped in gen_tcp ?
> - Is it safe to use it (will it be obsolete in the next release ?) ?
> -- Nicolas
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions