[erlang-questions] Setting packet option in ranch
Roberto Ostinelli
ostinelli@REDACTED
Wed Oct 16 15:36:31 CEST 2019
Thank you Loïc.
On Wed, Oct 16, 2019 at 2:55 PM Loïc Hoguin <essen@REDACTED> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191016/e2d81eeb/attachment.htm>
More information about the erlang-questions
mailing list