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

Function receive

tests/security/ConcurrentAuthLimit/ConcurrentAuthLimit.cpp:30–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30bool receive(const OpenDDS::DCPS::GUID_t& participant_guid,
31 ACE_SOCK_Dgram_Mcast& multicast_socket)
32{
33 // Wait for an SPDP announcement before proceeding.
34 ACE_Message_Block buff(64 * 1024);
35
36 ACE_INET_Addr remote;
37 buff.reset();
38
39 const ssize_t bytes = multicast_socket.recv(buff.wr_ptr(), buff.space(), remote);
40 buff.wr_ptr(bytes);
41
42 const Encoding encoding_plain_native(Encoding::KIND_XCDR1);
43 OpenDDS::DCPS::Serializer ser(&buff, encoding_plain_native);
44 Header header;
45 if (!(ser >> header)) {
46 return EXIT_FAILURE;
47 }
48
49 return make_part_guid(header.guidPrefix) == participant_guid;
50}
51
52OpenDDS::Security::SPDPdiscoveredParticipantData
53participant_data(DDS::DomainId_t domain,

Callers 1

ACE_TMAINFunction · 0.85

Calls 4

make_part_guidFunction · 0.85
resetMethod · 0.45
recvMethod · 0.45
spaceMethod · 0.45

Tested by

no test coverage detected