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

Joe K goodjoe2049@REDACTED
Tue Jan 2 18:38:12 CET 2018


Thanks, Ingela. I was just wondering why the these options exist if they
are forbidden. Now I understand.

On Tue, Jan 2, 2018 at 3:16 PM, Ingela Andin <ingela.andin@REDACTED> wrote:

> Hi!
>
> Jesper is correct about the reason it is not supported for DTLS, that is
> UDP is unreliable. Reason for setting the options to defult {packet, 0},
> {packet_size, 0} (e.i. no packet) is that general code in ssl_connection
> handles both TLS and DTLS data.
>
> Regards Ingela Erlang/OTP Team - Ericsson AB
>
> 2017-12-30 18:52 GMT+01:00 Joe K <goodjoe2049@REDACTED>:
>
>> Why is `packet` one of the default options here
>> https://github.com/erlang/otp/blob/master/lib/ssl/src/dtls_s
>> ocket.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_s
>> ocket.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/20180102/c95afd78/attachment.htm>


More information about the erlang-questions mailing list