diff options
Diffstat (limited to 'src/mongo/transport/transport_layer_manager.cpp')
-rw-r--r-- | src/mongo/transport/transport_layer_manager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/transport/transport_layer_manager.cpp b/src/mongo/transport/transport_layer_manager.cpp index 82e23e1a049..42d35d9c3d7 100644 --- a/src/mongo/transport/transport_layer_manager.cpp +++ b/src/mongo/transport/transport_layer_manager.cpp @@ -102,6 +102,15 @@ void TransportLayerManager::shutdown() { _foreach([](TransportLayer* tl) { tl->shutdown(); }); } +std::vector<HostAndPort> TransportLayerManager::getListeningPorts() const { + std::vector<HostAndPort> r; + _foreach([&r](TransportLayer* tl) { + auto hp = tl->getListeningPorts(); + r.insert(r.end(), hp.begin(), hp.end()); + }); + return r; +} + // TODO Same comment as start() Status TransportLayerManager::setup() { for (auto&& tl : _tls) { |