R14B gen_tcp:recv/2,3
Roberto Ostinelli
roberto@REDACTED
Fri Sep 17 01:08:45 CEST 2010
dear list,
i read from R14B release's readme:
http://erlang.org/download/otp_src_R14B.readme
OTP-8831 For a socket in the HTTP packet mode, the return value from
gen_tcp:recv/2,3 if there is an error in the header will be
{ok,{http_error,String}} instead of {error,{http_error,String}} to be
consistent with ssl:recv/2,3.
i'm not really sure i did understand well: does this mean that all
code which relies on gen_tcp:recv/2,3 needs to be rewritten? for
instance, will this code generate a no matching clause in R14B in case
an error is produced?
case gen_tcp:recv(Sock, Len, RecvTimeout) of
{ok, Bin} -> {ok, Bin};
{error, Reason} -> {error, Reason}
end.
i, for one, surely hope i've misinterpreted this statement..
r.
More information about the erlang-questions
mailing list