Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / tao / Blocked_Connect_Strategy.cpp
blob0c731feb8e4c0faae6f66bdb84f001c8e18edadc
1 #include "tao/Blocked_Connect_Strategy.h"
2 #include "tao/Connection_Handler.h"
4 #include "ace/Synch_Options.h"
6 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
8 TAO_Blocked_Connect_Strategy::TAO_Blocked_Connect_Strategy (
9 TAO_ORB_Core *orb_core)
10 : TAO_Connect_Strategy (orb_core)
14 void
15 TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout,
16 ACE_Synch_Options &options)
18 if (timeout != nullptr)
20 // Blocking with a timeout
21 options.set (ACE_Synch_Options::USE_TIMEOUT, *timeout);
23 else
25 // Making it sure it is blocking.
26 options.set (0, ACE_Time_Value::zero);
30 int
31 TAO_Blocked_Connect_Strategy::wait_i (TAO_LF_Event *,
32 TAO_Transport *,
33 ACE_Time_Value * )
35 // We cannot wait for connection completion
36 return -1;
39 TAO_END_VERSIONED_NAMESPACE_DECL