<div dir="ltr">Thank you Loïc.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 16, 2019 at 2:55 PM Loïc Hoguin <<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Transport:setops(Socket, [{packet, 4}]) at the start of your protocol code.<br>
<br>
The reason you cannot set it when starting the listener is because that <br>
configuration ought to be independent of the protocol, and packet <br>
options are protocol-dependent.<br>
<br>
Cheers,<br>
<br>
On 16/10/2019 14:33, Roberto Ostinelli wrote:<br>
> All,<br>
> I cannot see how to set the {packet, 4} option with ranch.<br>
> <br>
> ranch:start_listener(packet_test, packet_tcp, #{socket_opts => [{packet, <br>
> 4}, {port, 4444}]}, packet_test, []),<br>
> <br>
> However I get a "Transport option {packet, 4} unknown or invalid" error.<br>
> <br>
> Any pointers?<br>
> <br>
> Thank you,<br>
> r.<br>
> <br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
> <br>
<br>
-- <br>
Loïc Hoguin<br>
<a href="https://ninenines.eu" rel="noreferrer" target="_blank">https://ninenines.eu</a><br>
</blockquote></div>