[erlang-questions] How to solve the blocking accept call in a tcp_listener process ?
Wed May 20 13:19:29 CEST 2009
* Start the process using 'proc_lib' so it can be added to a supervisor
* Run accept with a short timeout so you can poll your mailbox for
messages to cancel
* Use gen_server:enter_loop (or other similar) to become a gen
behavior once the socket is connected.
On Wed, May 20, 2009 at 12:01, Gamoto <gamoto@REDACTED> wrote:
> Hi all,
> I come back with my initial question because the answers seem to be derived ...
> I changed the wording by adding "... in an OTP context, with supervision".
> Initial question:
> Many examples uses the async_accept primitive from the module prim_inet.
> This primitive is not documented (low level) and might change or dissapear.
> Do you know examples which don't use it but use a "clean" solution for the blocking accept call ?
> Or could you show an elegant solution in this forum ?
> J-Ph. Constantin
> erlang-questions mailing list
More information about the erlang-questions