Unicast 20k messages, $500-$1000 bounty
Fri Jul 17 12:12:33 CEST 2009
> No middleman then?
I think you are really asking for trouble, or at least a not very
robust server, if you go that route.
It is Socket programming 101 that writes can block when the TCP
receiver does not read and the flow control causes the TCP buffers to
Additionally read the docs about gen_tcp:send, at the end in the
example section where it states...
"The fact that the send call does not accept a timeout option, is
because timeouts on send is handled through the socket option
send_timeout. The behavior of a send operation with no receiver is in
a very high degree defined by the underlying TCP stack, as well as the
network infrastructure. If one wants to write code that handles a
hanging receiver that might eventually cause the sender to hang on a
send call, one writes code like the following. "
Although it does not explicitly state that gen_tcp:send can block I
think it is is common knowledge that it does, and the explanation of
how to handle timeouts would indicate that too.
Again just my 0.02c worth.
More information about the erlang-questions