[erlang-questions] gen_tcp send non-blocking in erlang?
Mon Mar 17 09:53:41 CET 2014
It is a very, very dangerous practice, because you loose control over your
program with non-blocking send.
First step that you MUST do is setting send_timeout on socket. By default
it is infinity and it means that your process may get blocked forever
trying to push data.
I don't know why infinity is a default value, it is really strange for me.
Second, dangerous step is just using port_command(Socket, IoData). Then you
must wait for messages from this socket. But don't use it =)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions