-
Notifications
You must be signed in to change notification settings - Fork 5.4k
connection handler: support multiple addresses in listener #21521
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
adisuissa
merged 21 commits into
envoyproxy:main
from
soulxu:multi_addresses_conn_handler
Jun 18, 2022
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
039b440
Enable to create ActiveTcpListener through the socket
soulxu 52b6994
Create UDP listener through the socket
soulxu 1677455
ListenerImpl: add listenSocketFactories interface
soulxu f6b64a9
ConnectionHandlerImpl: enable create multiple active listener
soulxu 7c9c661
fix test
soulxu 38bf82f
correct comments
soulxu 5cc2bad
correct the variable name
soulxu 375e492
fix comments
soulxu f977351
fix clang-tidy
soulxu c3feb80
update coverage
soulxu b7f7798
Merge branch 'main' into multi_addresses_conn_handler
soulxu d95aefb
fix format
soulxu 5c96078
fix active internal listener test
soulxu 6859e07
Merge branch 'main' into multi_addresses_conn_handler
soulxu 31f2ffe
add comments
soulxu 1b07b79
Address comments
soulxu b005722
ConnectionHandlerImpl: Add test case for multiple addreses
soulxu 52d4681
Address comments
soulxu 289179d
fix coverage
soulxu 2bb45fe
Add more test for inplace update
soulxu 5ceed88
fix format
soulxu 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 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 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,7 +390,11 @@ class AdminImpl : public Admin, | |
| Network::FilterChainManager& filterChainManager() override { return parent_; } | ||
| Network::FilterChainFactory& filterChainFactory() override { return parent_; } | ||
| Network::ListenSocketFactory& listenSocketFactory() override { | ||
| return *parent_.socket_factory_; | ||
| ASSERT(parent_.socket_factories_.size() == 1); | ||
| return *parent_.socket_factories_[0]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we have an assert here that the number of socket factories is 1?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, let me add one |
||
| } | ||
| std::vector<Network::ListenSocketFactoryPtr>& listenSocketFactories() override { | ||
| return parent_.socket_factories_; | ||
| } | ||
| bool bindToPort() override { return true; } | ||
| bool handOffRestoredDestinationConnections() const override { return false; } | ||
|
|
@@ -495,7 +499,7 @@ class AdminImpl : public Admin, | |
| ConfigTrackerImpl config_tracker_; | ||
| const Network::FilterChainSharedPtr admin_filter_chain_; | ||
| Network::SocketSharedPtr socket_; | ||
| Network::ListenSocketFactoryPtr socket_factory_; | ||
| std::vector<Network::ListenSocketFactoryPtr> socket_factories_; | ||
| AdminListenerPtr listener_; | ||
| const AdminInternalAddressConfig internal_address_config_; | ||
| const LocalReply::LocalReplyPtr local_reply_; | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.