| 729 | {} |
| 730 | |
| 731 | void HorizontalHandler::enqueue_or_send_message(const ACE_INET_Addr& addr, |
| 732 | const StringSet& to_partitions, |
| 733 | const GuidSet& to_guids, |
| 734 | const OpenDDS::DCPS::Lockable_Message_Block_Ptr& msg, |
| 735 | const OpenDDS::DCPS::MonotonicTimePoint& now) |
| 736 | { |
| 737 | using namespace OpenDDS::DCPS; |
| 738 | |
| 739 | const Encoding encoding(Encoding::KIND_XCDR1); |
| 740 | |
| 741 | RelayHeader relay_header; |
| 742 | auto& tp = relay_header.to_partitions(); |
| 743 | for (const auto& p : to_partitions) { |
| 744 | tp.push_back(p); |
| 745 | } |
| 746 | auto& tg = relay_header.to_guids(); |
| 747 | for (const auto& g : to_guids) { |
| 748 | tg.push_back(rtps_guid_to_relay_guid(g)); |
| 749 | } |
| 750 | |
| 751 | const size_t size = serialized_size(encoding, relay_header); |
| 752 | const size_t total_size = size + msg->length(); |
| 753 | if (total_size > TransportSendStrategy::UDP_MAX_MESSAGE_SIZE) { |
| 754 | HANDLER_ERROR((LM_ERROR, "(%P|%t) ERROR: HorizontalHandler::enqueue_message %C header and message too large (%B > %B)\n", name_.c_str(), total_size, static_cast<size_t>(TransportSendStrategy::UDP_MAX_MESSAGE_SIZE))); |
| 755 | return; |
| 756 | } |
| 757 | |
| 758 | Lockable_Message_Block_Ptr header_block(new ACE_Message_Block(size)); |
| 759 | Serializer ser(header_block.get(), encoding); |
| 760 | ser << relay_header; |
| 761 | header_block.lockable_cont(msg); |
| 762 | RelayHandler::enqueue_message(addr, header_block, now, MessageType::Rtps); |
| 763 | } |
| 764 | |
| 765 | CORBA::ULong HorizontalHandler::process_message(const ACE_INET_Addr&, |
| 766 | const OpenDDS::DCPS::MonotonicTimePoint& now, |
no test coverage detected