[erlang-questions] Strange Socket Behaviour Was:Parents always take children with them?
Matthias Lang
matthias@REDACTED
Sun Apr 29 08:05:20 CEST 2007
Ludovic Coquelle writes:
> ... so the normal behavior is that gen_recv doesn't block, which is probably
> intended since you request 0 byte with infinity timeout
More precisely, gen_tcp:recv(P, 0) will block until at least one octet
of data is available, with the options Andrew is using.
But yes, Andrew's problem is as you diagnosed: his "critical" line of
code will crash the process because the second argument to io:format
must be a list.
Matthias
More information about the erlang-questions
mailing list