Skip to content

Add callback for extendmaxdata - #2283

Merged
tatsuhiro-t merged 1 commit into
ngtcp2:mainfrom
martenrichter:callbackmaxdata
Aug 16, 2026
Merged

tatsuhiro-t merged 1 commit into
ngtcp2:mainfrom
martenrichter:callbackmaxdata

Conversation

@martenrichter

Copy link
Copy Markdown
Contributor

Some users of the library (node.js),
require a callback, that signals, when new
maxdata values are available, as the maxdata
value is cached and evaluated outside ngtcp2.

Fixes #2243

@martenrichter

Copy link
Copy Markdown
Contributor Author

We discussed #2243 in the node.js quic meeting.
Conclusion was that we like to ask you a PR for the callback.
The reason is that the current node.js quic implementation caches the max data values in their C++/js objects and need a hint, when to invalidate the values. The alternative would be to poll the value after each transmission and this does not sounds good.
I hope that I managed to match the coding style.
Thanks!

Comment thread lib/ngtcp2_conn.c Resolved
Comment thread lib/ngtcp2_conn.c Resolved
Comment thread lib/ngtcp2_conn.c Outdated
rv = conn_call_extend_max_data(conn, conn->tx.max_offset);
if (rv != 0) {
return rv;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not call it here. See the above comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

Comment thread lib/ngtcp2_conn.c Resolved
Comment thread lib/ngtcp2_conn.c Resolved
Comment thread lib/includes/ngtcp2/ngtcp2.h Resolved
Comment thread lib/ngtcp2_conn.c Resolved
@martenrichter

Copy link
Copy Markdown
Contributor Author

Ok, I have correct the things you requested and then did a force push so that the history is clean.

Comment thread lib/ngtcp2_conn.c Resolved
Some users of the library (node.js),
require a callback, that signals, when new
maxdata values are available, as the maxdata
value is cached and evaluated outside ngtcp2.

Fixes ngtcp2#2243

Signed-off-by: Marten Richter <[email protected]>
@tatsuhiro-t
tatsuhiro-t merged commit 61c802b into ngtcp2:main Aug 16, 2026
37 checks passed
@tatsuhiro-t

Copy link
Copy Markdown
Member

Thank you for PR. Merged now.

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.

Why is there no callback for static conn_recv_max_data into application?

2 participants