[erlang-questions] How to solve the blocking accept call in atcp_listener process ?

info info@REDACTED
Tue May 19 23:32:49 CEST 2009


Could you be more explicit please ...

> 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 ?

You could always put the blocking call into it's own process.  When a
connection occurs, change the port's owner and send the port in a
message.  (And open the port in passive mode to make sure messages
aren't received before switching the owner.)
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090519/a2a86afb/attachment.htm>


More information about the erlang-questions mailing list