2 //=============================================================================
4 * @file Reactor_Performance_Test.h
6 * This file includes template class definitions for the
7 * Reactor_Performance_Test.cpp program. This class gets its own
8 * header file to work around AIX C++ compiler "features" related
9 * to template instantiation...
11 * @author Irfan Pyarali <irfan@cs.wustl.edu> and Steve Huston <shuston@riverace.com>
13 //=============================================================================
16 #ifndef ACE_TESTS_REACTOR_PERFORMANCE_TEST_H
17 #define ACE_TESTS_REACTOR_PERFORMANCE_TEST_H
19 #include "ace/SOCK_Stream.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "ace/Svc_Handler.h"
30 * @brief Simple class for reading in the data
32 class Read_Handler
: public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_SYNCH
>
35 static void set_countdown (int nconnections
);
37 /// The Svc_Handler callbacks.
38 virtual int open (void *);
39 virtual int handle_input (ACE_HANDLE h
);
40 virtual int handle_close (ACE_HANDLE handle
,
41 ACE_Reactor_Mask close_mask
);
44 /// How many connections are we waiting for.
49 * @class Write_Handler
51 * @brief This Svc_Handler simply connects to a server and sends some
52 * output to it. Its purpose is to feed the test.
54 class Write_Handler
: public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_SYNCH
>
57 virtual int open (void *);
58 virtual int send_data (void);
61 #endif /* ACE_TESTS_REACTOR_PERFORMANCE_TEST_H */