Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / tests / Reactor_Performance_Test.h
blob758ac20745f49bddacdea3b4d6c32e3f2a7d2752
2 //=============================================================================
3 /**
4 * @file Reactor_Performance_Test.h
6 * This file includes template class definitions for the
7 * Reactor_Performance_Test.cpp program.
9 * @author Irfan Pyarali <irfan@cs.wustl.edu> and Steve Huston <shuston@riverace.com>
11 //=============================================================================
14 #ifndef ACE_TESTS_REACTOR_PERFORMANCE_TEST_H
15 #define ACE_TESTS_REACTOR_PERFORMANCE_TEST_H
17 #include "ace/SOCK_Stream.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/Svc_Handler.h"
25 /**
26 * @class Read_Handler
28 * @brief Simple class for reading in the data
30 class Read_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH>
32 public:
33 static void set_countdown (int nconnections);
35 /// The Svc_Handler callbacks.
36 virtual int open (void *);
37 virtual int handle_input (ACE_HANDLE h);
38 virtual int handle_close (ACE_HANDLE handle,
39 ACE_Reactor_Mask close_mask);
41 private:
42 /// How many connections are we waiting for.
43 static int waiting_;
46 /**
47 * @class Write_Handler
49 * @brief This Svc_Handler simply connects to a server and sends some
50 * output to it. Its purpose is to feed the test.
52 class Write_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH>
54 public:
55 virtual int open (void *);
56 virtual int send_data ();
59 #endif /* ACE_TESTS_REACTOR_PERFORMANCE_TEST_H */