MCPcopy Create free account
hub / github.com/COVESA/vsomeip / suspend

Method suspend

implementation/endpoints/src/endpoint_manager_impl.cpp:1384–1402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1382}
1383
1384void endpoint_manager_impl::suspend() {
1385 std::vector<std::weak_ptr<boardnet_endpoint>> weak_endpoints;
1386
1387 {
1388 std::scoped_lock its_lock{endpoint_mutex_};
1389
1390 for (const auto& [its_port, protocols] : server_endpoints_) {
1391 for (const auto& [its_protocol, its_endpoint] : protocols) {
1392 weak_endpoints.push_back(its_endpoint);
1393 }
1394 }
1395 }
1396
1397 for (const auto& its_weak : weak_endpoints) {
1398 if (auto its_endpoint = its_weak.lock()) {
1399 its_endpoint->stop(false);
1400 }
1401 }
1402}
1403
1404void endpoint_manager_impl::resume() {
1405 std::vector<std::tuple<boost::asio::ip::address, uint16_t, bool, partition_id_t>> clients;

Callers 1

set_routing_stateMethod · 0.45

Calls 2

lockMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected