summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-12 07:04:08 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-12 07:04:08 +0000
commit0a2533fa7ba8d6317ec3178d0e95bfd4f2d56fe4 (patch)
treef4d485ce596a06d0097505b990dc0919845186be
parentb793421a9ee9249cccb9d6051260bb636ff70ab4 (diff)
downloadATCD-0a2533fa7ba8d6317ec3178d0e95bfd4f2d56fe4.tar.gz
made the server send several replies in response to a multicast request.
-rw-r--r--TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp
index deb6f64e8ec..408d61ef141 100644
--- a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp
+++ b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp
@@ -104,10 +104,20 @@ TAO_IOR_Multicast::handle_input (ACE_HANDLE)
remote_addr.set_port_number (mcast_info[0], 0);
// Send the object reference for the naming service
- result = response_.send (this->ior_,
- ACE_OS::strlen (this->ior_),
- remote_addr,
- 0);
+
+ // Wait to give client a chance to start receiving,
+ // Send two times to provide better protection against packet
+ // loss.
+ // @@Vishal, a better (not hardcoded) 'policy' solution for this should be provided.
+ for (int i = 0; i < 5; ++i)
+ {
+ ACE_OS::sleep (ACE_Time_Value (0, 10000));
+ result = response_.send (this->ior_,
+ ACE_OS::strlen (this->ior_),
+ remote_addr,
+ 0);
+ }
+
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) ior_: <%s>\n"