-
Notifications
You must be signed in to change notification settings - Fork 5.3k
quic: change QuicNetworkConnectivityObserver interface #35775
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
959cd4c
everything build
danzh1989 4b969c9
Merge branch 'main' into networkchange
danzh1989 242dc5e
finish plumbing
danzh1989 28e805a
add tests
danzh1989 a582d79
comments
danzh1989 1e57860
add runtime guard
danzh1989 e3663b2
change log
danzh1989 ccd0dd2
fix build
danzh1989 7e8e3d3
fix build again
danzh1989 84eeb68
more fix
danzh1989 2337129
fix compile option build
danzh1989 9725172
Merge branch 'main' into networkchange
danzh1989 845c19d
test coverage
danzh1989 462e7bd
fix build
danzh1989 76e0894
fix compile option build
danzh1989 e47c408
Merge branch 'main' into networkchange
danzh1989 c239b59
Merge branch 'main' into networkchange
danzh1989 2bf31a3
more merge fix
danzh1989 27058bc
comment
danzh1989 fe5b171
Merge branch 'main' into networkchange
danzh1989 2d78be5
new callback interface
danzh1989 f883a1c
Merge branch 'main' into networkchange
danzh1989 2af5cfb
dedup dispatcher post
danzh1989 471b7bb
Merge branch 'main' into networkchange
danzh1989 5ad0e26
fix unit test
danzh1989 ddd3739
revert some changes
danzh1989 c2c3909
Merge branch 'main' into networkchange
danzh1989 225d362
revert release note
danzh1989 eae7c9e
Merge branch 'main' into networkchange
danzh1989 ee6a0b4
observer interface change
danzh1989 bd3fd65
more interface changes
danzh1989 6815335
Merge branch 'main' into networkchange
danzh1989 cdc290d
revert transient connect failure handling
danzh1989 f668a04
remove quic_network_connectivity_observer_impl_lib
danzh1989 73d0b0e
build target
danzh1989 47d708f
revert tests
danzh1989 8c576fa
revert upstream BUILD
danzh1989 6ab8b05
revert mobile changes
danzh1989 3dba5e6
a disconnect interface
danzh1989 809ee7e
revert runtime
danzh1989 7c31d1e
fix build
danzh1989 f22a3d9
test coverage
danzh1989 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
source/common/quic/quic_network_connectivity_observer_impl.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #include "source/common/quic/quic_network_connectivity_observer_impl.h" | ||
|
|
||
| #include "source/common/quic/envoy_quic_client_session.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Quic { | ||
|
|
||
| QuicNetworkConnectivityObserverImpl::QuicNetworkConnectivityObserverImpl( | ||
| EnvoyQuicClientSession& session) | ||
| : session_(session) {} | ||
|
|
||
| void QuicNetworkConnectivityObserverImpl::onNetworkMadeDefault(NetworkHandle /*network*/) { | ||
| // TODO(danzh) propagate `network` to quic session. | ||
| (void)session_; | ||
| } | ||
|
|
||
| void QuicNetworkConnectivityObserverImpl::onNetworkConnected(NetworkHandle /*network*/) { | ||
| (void)session_; | ||
| } | ||
|
|
||
| void QuicNetworkConnectivityObserverImpl::onNetworkDisconnected(NetworkHandle /*network*/) { | ||
| (void)session_; | ||
| } | ||
|
|
||
| } // namespace Quic | ||
| } // namespace Envoy |
32 changes: 32 additions & 0 deletions
32
source/common/quic/quic_network_connectivity_observer_impl.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #pragma once | ||
|
|
||
| #include <memory> | ||
|
|
||
| #include "source/common/common/logger.h" | ||
| #include "source/common/quic/quic_network_connectivity_observer.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Quic { | ||
|
|
||
| class EnvoyQuicClientSession; | ||
|
|
||
| class QuicNetworkConnectivityObserverImpl : public QuicNetworkConnectivityObserver, | ||
| protected Logger::Loggable<Logger::Id::connection> { | ||
| public: | ||
| // session must outlive this object. | ||
| explicit QuicNetworkConnectivityObserverImpl(EnvoyQuicClientSession& session); | ||
| QuicNetworkConnectivityObserverImpl(const QuicNetworkConnectivityObserverImpl&) = delete; | ||
| QuicNetworkConnectivityObserverImpl& | ||
| operator=(const QuicNetworkConnectivityObserverImpl&) = delete; | ||
|
|
||
| // QuicNetworkConnectivityObserver | ||
| void onNetworkMadeDefault(NetworkHandle network) override; | ||
| void onNetworkConnected(NetworkHandle network) override; | ||
| void onNetworkDisconnected(NetworkHandle network) override; | ||
|
|
||
| private: | ||
| EnvoyQuicClientSession& session_; | ||
| }; | ||
|
|
||
| } // namespace Quic | ||
| } // namespace Envoy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be moved to inside the Envoy::Quic namespace so it is scoped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it into Envoy namespace.