summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LWFT/AppSideMonitor_Handler.cpp
blob: 1eb540dbf9a9cf16cd7fd0b8700f7ac81c1e2a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// -*- C++ -*-
// $Id$

/**
 *  @file  C++ Implementation: AppSideMonitor_Handler
 *
 *  @brief Defines implementation of AppSideMonitor_Handler.
 *
 */

#include "AppSideMonitor_Handler.h"
#include <iostream>

AppSideMonitor_Handler::AppSideMonitor_Handler ()
: acceptor_ (0)
{
  int *i = 0;
  std::cout << *i;
  std::cerr << "AppSideMonitor_Handler::AppSideMonitor_Handler\n";
}

int AppSideMonitor_Handler::handle_input (ACE_HANDLE)
{
  char ch;

  if (this->peer().recv (&ch, sizeof (ch) <= 0))
  {
    ACE_DEBUG((LM_DEBUG,"It looks like the monitor failed!\n"));
//    acceptor_->open ();
  }
  else
     ACE_DEBUG((LM_DEBUG,"It looks like the monitor is misbehaving!\n"));

  return -1;
}

int AppSideMonitor_Handler::open (void *factory)
{
  ACE_DEBUG((LM_DEBUG,"AppSideMonitor_Handler::open\n"));
  acceptor_ = static_cast <FactoryAcceptor *> (factory);
//  acceptor_->close();
  return super::open (factory);
}