00001 #include "tao/Blocked_Connect_Strategy.h" 00002 #include "tao/Connection_Handler.h" 00003 00004 #include "ace/Synch_Options.h" 00005 00006 ACE_RCSID(tao, 00007 Blocked_Connect_Strategy, 00008 "$Id: Blocked_Connect_Strategy.cpp 73141 2006-06-20 06:07:59Z jwillemsen $") 00009 00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00011 00012 TAO_Blocked_Connect_Strategy::TAO_Blocked_Connect_Strategy ( 00013 TAO_ORB_Core *orb_core) 00014 : TAO_Connect_Strategy (orb_core) 00015 { 00016 } 00017 00018 void 00019 TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout, 00020 ACE_Synch_Options &options) 00021 { 00022 if (timeout != 0) 00023 { 00024 // Blocking with a timeout 00025 options.set (ACE_Synch_Options::USE_TIMEOUT, 00026 *timeout); 00027 } 00028 else 00029 { 00030 // Making it sure it is blocking. 00031 options.set (0, 00032 ACE_Time_Value::zero); 00033 } 00034 } 00035 00036 int 00037 TAO_Blocked_Connect_Strategy::wait_i (TAO_LF_Event *, 00038 TAO_Transport *, 00039 ACE_Time_Value * ) 00040 { 00041 // We cannot wait for connection completion 00042 return -1; 00043 } 00044 00045 TAO_END_VERSIONED_NAMESPACE_DECL