escalus
escalus copied to clipboard
Add an option to include maybe_stream_resumption step
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 :)
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
?
Specifically, maybe_stream_management
could have one more case clause for the new value of the option.
Old PR, closing