MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / send

Method send

tools/rtpsrelay/RelayHandler.cpp:653–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653CORBA::ULong VerticalHandler::send(GuidAddrSet::Proxy& proxy,
654 const OpenDDS::DCPS::GUID_t& src_guid,
655 const StringSet& to_partitions,
656 const GuidSet& to_guids,
657 bool send_to_application_participant,
658 const OpenDDS::DCPS::Lockable_Message_Block_Ptr& msg,
659 const OpenDDS::DCPS::MonotonicTimePoint& now)
660{
661 AddressSet address_set;
662 populate_address_set(address_set, to_partitions);
663 const auto type = MessageType::Rtps;
664
665 CORBA::ULong sent = 0;
666 for (const auto& addr : address_set) {
667 if (addr != horizontal_address_) {
668 horizontal_handler_->enqueue_or_send_message(addr, to_partitions, to_guids, msg, now);
669 ++sent;
670 } else {
671 // Local recipients.
672 GuidSet guids;
673 guid_partition_table_.lookup(guids, to_partitions, to_guids);
674 for (const auto& guid : guids) {
675 if (guid == src_guid) {
676 continue;
677 }
678 auto p = proxy.find(guid);
679 if (p != proxy.end()) {
680 p->second.foreach_addr(port(),
681 [&](const ACE_INET_Addr& address) {
682 venqueue_message(address, msg, now, type);
683 ++sent;
684 });
685 }
686 }
687 }
688 }
689
690 if (send_to_application_participant) {
691 venqueue_message(application_participant_addr_, msg, now, type);
692 ++sent;
693 }
694
695 return sent;
696}
697
698size_t VerticalHandler::send(const ACE_INET_Addr& addr,
699 OpenDDS::STUN::Message message,

Callers 2

processRequestMethod · 0.45
send_iMethod · 0.45

Calls 8

foreach_addrMethod · 0.80
blockMethod · 0.80
lookupMethod · 0.45
findMethod · 0.45
endMethod · 0.45
lengthMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected