[erlang-questions] packet and packet_size options in dlls socket

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Sat Dec 30 20:21:27 CET 2017


Pure guess:

Because UDP is an unreliable protocol and thus has no support for the
"packet" option (whereas TCP does). My guess is that {packet, 0} has no
real effect in the default option list.

On Sat, Dec 30, 2017 at 6:52 PM Joe K <goodjoe2049@REDACTED> wrote:

> Why is `packet` one of the default options here
>
> https://github.com/erlang/otp/blob/master/lib/ssl/src/dtls_socket.erl#L142-L143
>
>   default_inet_values() ->
>     [{active, true}, {mode, list}, {packet, 0}, {packet_size, 0}].
>
> But is then prohibited here
>
> https://github.com/erlang/otp/blob/master/lib/ssl/src/dtls_socket.erl#L173-L174
>
>   emulated_options([{packet, _} = Opt | _], _, _) ->
>     throw({error, {options, {not_supported, Opt}}});
>
> Same for `packet_size` option.
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171230/e4eda198/attachment.htm>


More information about the erlang-questions mailing list