Skip to content

expose local and remote settings in ConnectionState#5533

Merged
marten-seemann merged 1 commit intomasterfrom
connection-stats-both-sides
Jan 9, 2026
Merged

expose local and remote settings in ConnectionState#5533
marten-seemann merged 1 commit intomasterfrom
connection-stats-both-sides

Conversation

@marten-seemann
Copy link
Copy Markdown
Member

This allows the application to check for datagram and reliable stream reset support for both the local and the remote side.

@marten-seemann marten-seemann requested a review from Copilot January 9, 2026 04:33
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented Jan 9, 2026

Expose separate local and remote datagram and stream reset partial delivery flags via Conn.ConnectionState in connection.go to clarify settings in ConnectionState

Replace flat booleans with SupportsDatagrams.Local/Remote and SupportsStreamResetPartialDelivery.Local/Remote in ConnectionState, update Conn.ConnectionState to populate these from config and peer transport parameters, and adjust HTTP/3 control stream checks and tests to read the new fields.

📍Where to Start

Start with Conn.ConnectionState in connection.go, then review struct changes in ConnectionState in interface.go.


Macroscope summarized ad2061e.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.17%. Comparing base (d082d9f) to head (ad2061e).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5533      +/-   ##
==========================================
+ Coverage   84.16%   84.17%   +0.02%     
==========================================
  Files         159      159              
  Lines       16366    16364       -2     
==========================================
+ Hits        13773    13774       +1     
+ Misses       1958     1956       -2     
+ Partials      635      634       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread connection.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR converts the SupportsDatagrams and SupportsStreamResetPartialDelivery fields in ConnectionState from simple boolean values to struct types with Remote and Local fields. This breaking API change allows applications to separately check whether datagram and reliable stream reset support is enabled locally versus advertised by the remote peer.

Key Changes:

  • Changed ConnectionState.SupportsDatagrams from bool to a struct with Remote and Local bool fields
  • Changed ConnectionState.SupportsStreamResetPartialDelivery from bool to a struct with Remote and Local bool fields
  • Updated ConnectionState() method to dynamically populate both local and remote support flags on each call instead of caching values

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
interface.go Changed SupportsDatagrams and SupportsStreamResetPartialDelivery from bool fields to structs with Remote and Local bool fields
connection.go Updated ConnectionState() to populate both Remote and Local fields dynamically; removed old caching logic from restoreTransportParameters and handleTransportParameters
http3/conn.go Updated datagram support check to use SupportsDatagrams.Remote field
integrationtests/self/zero_rtt_test.go Updated tests to check both Remote and Local fields separately
integrationtests/self/handshake_test.go Updated tests to check both Remote and Local fields separately with descriptive messages
integrationtests/self/datagram_test.go Enhanced tests to verify both endpoints' views of local and remote datagram support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This allows the application to check for datagram and reliable stream
reset support for both the local and the remote side.
@marten-seemann marten-seemann force-pushed the connection-stats-both-sides branch from b63a964 to ad2061e Compare January 9, 2026 07:38
@marten-seemann marten-seemann merged commit 2020668 into master Jan 9, 2026
49 checks passed
@marten-seemann marten-seemann deleted the connection-stats-both-sides branch January 9, 2026 07:57
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.

2 participants