示例#1
0
// Listing 2 code/ch07
int Client::open (void *p)
{
  ACE_Time_Value iter_delay (2);   // Two seconds
  if (super::open (p) == -1)
    return -1;
  this->notifier_.reactor (this->reactor ());
  this->msg_queue ()->notification_strategy (&this->notifier_);
  this->iterations_ = 0;
  return this->reactor ()->schedule_timer
    (this, 0, ACE_Time_Value::zero, iter_delay);
}
示例#2
0
int ClientHandler::open(void* p)
{
    if(super::open(p)==-1)
    {
        return -1;
    }
    ACE_DEBUG((LM_DEBUG, ACE_TEXT("[%T](%P|%t) Connection Start\n")));
    this->iterations_ = 0;
    ACE_Time_Value iter_delay(2);
    return this->reactor()->schedule_timer(this,0,ACE_Time_Value::zero,iter_delay);
}