In case someone wonders, just add the <font face="courier new, monospace">{active, false}</font> option to inet and you're good.<div><br></div><div>I thought that was the default behaviour.</div><div><br></div><div>r.<br>
<br><div class="gmail_quote">On Sat, Oct 20, 2012 at 5:00 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi list,<div><br></div><div>this should be simple but I don't get what is going on.</div><div><br></div><div>On a server:</div><div><br></div><div><font face="courier new, monospace">[...listening and connection...]</font></div>
<div><font face="courier new, monospace">{ok, Data} = gen_tcp:recv(Socket, 0),</font></div><div><font face="courier new, monospace">ok = gen_tcp:send(Socket,<<"some response">>).</font></div><div><br>
</div><div>Data received from client (see below) is correctly <font face="courier new, monospace"><<"some data">></font>.</div><div><br></div><div>On the client:</div><div><br></div><div><div><font face="courier new, monospace">{ok, Socket} = gen_tcp:connect("localhost", 8500, [binary, {packet, raw}]),</font></div>
<div><font face="courier new, monospace">ok = gen_tcp:send(Socket, <<"some data">>),</font></div><div><font face="courier new, monospace">gen_tcp:recv(Socket,0).</font></div></div><div><br></div><div>
Instead of <font face="courier new, monospace">{ok, <<"some response">>}</font>, the last line returns<font face="courier new, monospace"> {error,einval}</font>.</div><div><br></div><div>Anywhere I should start looking?..</div>
<div><br></div><div>Thank you,</div><div><br></div><div>r. </div><div><br></div>
</blockquote></div><br></div>