Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic config listener acceptors #328

Merged
merged 12 commits into from
Dec 12, 2024

Conversation

qzhuyan
Copy link
Collaborator

@qzhuyan qzhuyan commented Dec 12, 2024

This PR combines:
#327
#308

Because #308 is needed for CI to pass.

target v0.2.x

server side conn configs are deferred to set at handshake time instead of spawn(accept) time.

New:

new async_handshake/2
Support override the conn opts just before the handshake.
New listener scope conf table for handshake the new incoming connections.
New quicer_connection:start_acceptor which supports proc_start_opts and deprecating the old start_link for server.
New quicer_listener:get_conf/2
New experimental API: quicer:probe/2 for probe the connection state with 0 len unreliable datagram

Breaking changes:

c struct ACCEPTOR no longer holds the conn settings(opts).
this also reduces the memory footprint per conn acceptor and stream acceptor.
async_accept/2 ignore the 2nd arg which was for conn opts.
quicer_connection behavior defer the conn settings overrides till handshake.
quicer_listener:reload/2
New acceptors now use the new reloaded config.

other

proper tests range is limited due to microsoft/msquic#4705

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12292086247

Details

  • 84 of 98 (85.71%) changed or added relevant lines in 6 files are covered.
  • 21 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.3%) to 86.214%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/quicer_connection.erl 14 15 93.33%
src/quicer_nif.erl 0 1 0.0%
src/quicer.erl 12 14 85.71%
src/quicer_lib.erl 23 27 85.19%
c_src/quicer_connection.c 18 24 75.0%
Files with Coverage Reduction New Missed Lines %
src/quicer_server_conn_callback.erl 1 61.54%
src/quicer.erl 1 91.3%
src/quicer_stream.erl 1 77.66%
c_src/quicer_stream.c 2 89.34%
c_src/quicer_config.c 6 87.49%
src/quicer_connection.erl 10 65.17%
Totals Coverage Status
Change from base Build 12204890233: -0.3%
Covered Lines: 4065
Relevant Lines: 4715

💛 - Coveralls

@qzhuyan qzhuyan marked this pull request as ready for review December 12, 2024 10:05
@qzhuyan qzhuyan merged commit 1f933bc into emqx:main Dec 12, 2024
48 checks passed
@qzhuyan qzhuyan deleted the dev/william/dyn-acceptors-2 branch December 12, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants