[erlang-questions] dialyzer and socket without option 'active'

Ludovic Coquelle lcoquelle@REDACTED
Tue Nov 6 06:43:40 CET 2007


Hi,
First, thanks for dialyzer contributors: dialyzer find caveat as fast as I
write bug :)

However, it seems to fail to understand this code:
I open a TCP socket with option [{active, false}, {packet,http}],
thus I should be able to write something along the line of:
case gen_tcp:recv(Sock, 0, TO) ->
{ok, {http_request, M, P, V}} -> ...
Any -> ...
end

The code works, but dialyzer complains that 'case' around gen_tcp:recv can
never match {'error',atom()} | {'ok',binary() | possibly_improper_list()}
... looks like dialyzer do not understand the non-documented feature (http
packet + active false)

Is it a known behaviour? Am I doing something wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071106/5ba6b1cc/attachment.htm>


More information about the erlang-questions mailing list