00001 #include "orbsvcs/SSLIOP/SSLIOP_Accept_Strategy.h"
00002
00003
00004 ACE_RCSID (SSLIOP,
00005 SSLIOP_Accept_Strategy,
00006 "SSLIOP_Accept_Strategy.cpp,v 1.5 2006/03/14 06:14:35 jtc Exp")
00007
00008 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00009
00010 TAO::SSLIOP::Accept_Strategy::Accept_Strategy (
00011 TAO_ORB_Core * orb_core,
00012 const ACE_Time_Value & timeout)
00013 : TAO_Accept_Strategy<TAO::SSLIOP::Connection_Handler,
00014 ACE_SSL_SOCK_ACCEPTOR> (orb_core),
00015 timeout_ (timeout)
00016 {
00017 }
00018
00019 int
00020 TAO::SSLIOP::Accept_Strategy::accept_svc_handler (handler_type * svc_handler)
00021 {
00022 ACE_TRACE ("TAO::SSLIOP::Accept_Strategy::accept_svc_handler");
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 ACE_Time_Value timeout (this->timeout_);
00038
00039
00040
00041
00042
00043
00044 const int reset_new_handle = this->reactor_->uses_event_associations ();
00045
00046 if (this->peer_acceptor_.accept (svc_handler->peer (),
00047 0,
00048 &timeout,
00049 1,
00050 reset_new_handle
00051 ) == -1)
00052 {
00053
00054 svc_handler->close (0);
00055
00056 return -1;
00057 }
00058 else
00059 return 0;
00060 }
00061
00062 TAO_END_VERSIONED_NAMESPACE_DECL