Connect_Strategy.cpp

Go to the documentation of this file.
00001 #include "tao/Connect_Strategy.h"
00002 #include "tao/Transport.h"
00003 #include "tao/Connection_Handler.h"
00004 #include "tao/LF_Multi_Event.h"
00005 
00006 ACE_RCSID (tao,
00007            Connect_Strategy,
00008            "Connect_Strategy.cpp,v 1.10 2006/04/26 17:12:47 mesnier_p Exp")
00009 
00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00011 
00012 TAO_Connect_Strategy::TAO_Connect_Strategy (TAO_ORB_Core *orb_core)
00013   : orb_core_ (orb_core)
00014 {
00015 }
00016 
00017 
00018 TAO_Connect_Strategy::~TAO_Connect_Strategy (void)
00019 {
00020 }
00021 
00022 int
00023 TAO_Connect_Strategy::wait (TAO_Connection_Handler *ch,
00024                             ACE_Time_Value *max_wait_time)
00025 {
00026   if (ch == 0)
00027     return -1;
00028 
00029   return this->wait_i (ch, ch->transport (),max_wait_time);
00030 }
00031 
00032 int
00033 TAO_Connect_Strategy::wait (TAO_Transport *t,
00034                             ACE_Time_Value *max_wait_time)
00035 {
00036   // Basically the connection was EINPROGRESS, but before we could
00037   // wait for it some other thread detected a failure and cleaned up
00038   // the connection handler.
00039   if (t == 0)
00040     return -1;
00041 
00042   return this->wait_i (t->connection_handler(),t,max_wait_time);
00043 }
00044 
00045 int
00046 TAO_Connect_Strategy::wait (TAO_LF_Multi_Event *mev,
00047                             ACE_Time_Value *max_wait_time)
00048 {
00049   return this->wait_i (mev, mev->base_transport(), max_wait_time);
00050 }
00051 
00052 int
00053 TAO_Connect_Strategy::poll (TAO_LF_Multi_Event *mev)
00054 {
00055   ACE_Time_Value zero(ACE_Time_Value::zero);
00056   return this->wait_i (mev, mev->base_transport(), &zero);
00057 }
00058 
00059 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:09 2006 for TAO by doxygen 1.3.6