Hello! <br><br>I'm trying to become an erlang convert (from Python) and I do mostly network programming.<br><br>So I wrote up this little tidbit:<br><br>-module(test).<br>-export([client/1]).<br><br>client([Port]) -><br>
    case gen_tcp:connect("127.0.0.1", Port, [list,{packet,0}]) of<br>        {ok, Socket} -><br>            gen_tcp:send(Socket,"auth iltd!dy69?\r\n\r\n"),<br>            gen_tcp:send(Socket,"event plain text\r\n\r\n"),<br>
            loop(Socket);<br>        {error, Reason} -><br>            print_stuff([Reason]),<br>            ok<br>    end.<br><br>loop(Socket) -><br>    case gen_tcp:recv(Socket, 0) of<br>        {ok, Data} -><br>
            print_stuff([Data]),<br>            loop(Socket);<br>        {error, closed} -><br>            ok<br>    end.<br><br>print_stuff([Text]) -><br>    io:format("~w", [Text]).<br><br>It compiles ... but when I run ... well ... it spits this:<br>
<br>=ERROR REPORT==== 5-Mar-2009::20:19:27 ===<br>Error in process <0.30.0> with exit value: {function_clause,[{test,client,[8021]},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}<br><br>** exited: {function_clause,[{test,client,[8021]},<br>
                             {erl_eval,do_apply,5},<br>                             {shell,exprs,6},<br>                             {shell,eval_loop,3}]} **<br><br><br>So what did I hose up?  And more importantly ... where is some documentation re: how to debug the "error report".<br>
<br>Thanks for any assistance!<br><br>SDR<br>