[erlang-questions] Setting packet option in ranch
Loïc Hoguin
essen@REDACTED
Wed Oct 16 14:55:49 CEST 2019
Transport:setops(Socket, [{packet, 4}]) at the start of your protocol code.
The reason you cannot set it when starting the listener is because that
configuration ought to be independent of the protocol, and packet
options are protocol-dependent.
Cheers,
On 16/10/2019 14:33, Roberto Ostinelli wrote:
> All,
> I cannot see how to set the {packet, 4} option with ranch.
>
> ranch:start_listener(packet_test, packet_tcp, #{socket_opts => [{packet,
> 4}, {port, 4444}]}, packet_test, []),
>
> However I get a "Transport option {packet, 4} unknown or invalid" error.
>
> Any pointers?
>
> Thank you,
> r.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
Loïc Hoguin
https://ninenines.eu
More information about the erlang-questions
mailing list