escalus icon indicating copy to clipboard operation
escalus copied to clipboard

Add an option to include maybe_stream_resumption step

Open kanes115 opened this issue 7 years ago • 2 comments

This PR let's user tell connection module that it wants to enable stream management with resume option. It is now not available without specifying all the steps in escalus_connection:start/2.

Now it would be enough to add {connection_steps, default_resume} to user spec in escalus_connection:start/2. This PR does not change the API, just extends it (with this option).

I add this as I needed it in this PR

If I miss the way I should specify that I want to use maybe_stream_resumption, let me know, please :)

kanes115 avatar Dec 18 '17 12:12 kanes115

Nice idea!

However, I have a hunch it would be a bit misleading if connection_steps was reused in such a way, since the name suggests it's a list/group of things. Still, there's a stream_management (now boolean) option allowed in the user spec and handled by maybe_stream_management and maybe_stream_resumption in escalus_session.

Could you rework this patch to introduce a new resume_by_default value of stream_management option, so that it's picked up by the relevant functions in escalus_session?

erszcz avatar Jan 04 '18 14:01 erszcz

Specifically, maybe_stream_management could have one more case clause for the new value of the option.

erszcz avatar Jan 04 '18 14:01 erszcz

Old PR, closing

arcusfelis avatar Jul 30 '24 14:07 arcusfelis