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

Method print_status

implementation/endpoints/src/tcp_server_endpoint_impl.cpp:986–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986void tcp_server_endpoint_impl::print_status() {
987 std::scoped_lock its_lock(mutex_);
988 connections_t its_connections;
989 {
990 std::scoped_lock its_lock_inner(connections_mutex_);
991 its_connections = connections_;
992 }
993
994 VSOMEIP_INFO_P << instance_name_ << local_.port() << " connections: " << its_connections.size() << " targets: " << targets_.size();
995 for (const auto& c : its_connections) {
996 std::size_t its_data_size(0);
997 std::size_t its_queue_size(0);
998 std::size_t its_recv_size(0);
999 {
1000 std::unique_lock c_s_lock(c.second->get_socket_lock());
1001 its_recv_size = c.second->get_recv_buffer_capacity();
1002 }
1003 auto found_queue = targets_.find(c.first);
1004 if (found_queue != targets_.end()) {
1005 its_queue_size = found_queue->second.queue_.size();
1006 its_data_size = found_queue->second.queue_size_;
1007 }
1008 VSOMEIP_INFO_P << instance_name_ << "Client: " << c.second->get_address_port_remote() << " queue: " << its_queue_size
1009 << " data: " << its_data_size << " recv_buffer: " << its_recv_size;
1010 }
1011}
1012
1013std::string tcp_server_endpoint_impl::get_remote_information(const target_data_iterator_type _it) const {
1014 return _it->first.address().to_string() + ":" + std::to_string(_it->first.port());

Callers

nothing calls this directly

Calls 5

get_socket_lockMethod · 0.80
endMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected