[erlang-questions] Unimplemented {buffer, integer()} option in ssl module - bug?

Ingela Andin ingela.andin@REDACTED
Fri Dec 2 14:57:48 CET 2016


Hi!

2016-12-02 11:43 GMT+01:00 Alex S. <alex0player@REDACTED>:

>
> 2 дек. 2016 г., в 13:28, Ingela Andin <ingela.andin@REDACTED> написал(а):
>
>
>
> 2016-12-01 12:37 GMT+01:00 Richard Jones <rj@REDACTED>:
>
>> The {buffer, integer()} option from gen_tcp is useful for breaking up
>> incoming data into manageable sizes, especially when in {packet, line}
>> mode.
>>
>> The docs suggest (kinda) that the gen_tcp options should also work
>> when connecting via the ssl module, but this isn'
>
> always the case -
>> the buffer option is silently ignored by ssl:connect
>>
>
> Actually it is not ignored it just is not has no noticeable affect to you.
>
>
> Is this
>
> a bug? Tested on erl 17, 18, 19
>>
>>
> For this option to work as expected for you it needs to be emulated by the
> ssl process as are packet related options. So it is a missing feature.
>
> Regards  Ingela Erlang/OTP- team
>
> I would argue that the combination of these two effects can also be
> described as «buffer_size is pushed a level lower» (where it is obviously
> not useful to the user of ssl module), and I would additionally argue that
> erroneously so. The option needs to be either explicitly not supported
> (with a note in the documentation), or do the right thing, not do some
> invisible thing that has no positive effect.
>


I am not disagreeing  with you on that.  I think we can consider it a bug
that this options is let through, and a missing feature that it is not
emulated. The reasoning is that ssl shall not  do option checking on
gen_tcp options that may be used and does note affect ssl. But some options
must be emulated. This option was clearly missed. Anyone wanting this
option is welcome to make a PR.

Regards  Ingela Erlang/OTP- team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161202/c7c632be/attachment.htm>


More information about the erlang-questions mailing list