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

Richard Jones rj@REDACTED
Wed Dec 7 12:21:22 CET 2016


Ok. Imo the docs aren't really clear on this. In lieu of any patch, it
would be nice to see more explicit docs listing which gen_tcp options
are emulated by SSL and which aren't.

for now I am emulating the option in my socket wrapper module :)

thanks
RJ

On 2 December 2016 at 13:57, Ingela Andin <ingela.andin@REDACTED> wrote:
> 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
>
>



More information about the erlang-questions mailing list