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>