[erlang-questions] strange behaviour of gen_tcp:connect

Gamoto gamoto@REDACTED
Tue Apr 7 11:13:46 CEST 2009

I an windows server 2003. I don't understand why gen_tcp:connect returns ALWAYS an error.
"connect" should be blocking, the port is free, I didn't precise a timeout.  I also tried with "localhost".
Another strange effect: error returned is "econnrefused" or, when another emacs is opened with erlang code inside, the returned error is "timeout" !!!
Is it "normal" with Erlang ?


    case gen_tcp:connect("",1688,[binary, {packet, 0}]) of
	    io:format("Socket established~n"),
	    io:format("Error on connect: ~s~n",[Reason])

More information about the erlang-questions mailing list