2 //=============================================================================
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)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/Svc_Handler.h"
28 * @brief Simple class for reading in the data
30 class Read_Handler
: public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_SYNCH
>
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
);
42 /// How many connections are we waiting for.
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
>
55 virtual int open (void *);
56 virtual int send_data ();
59 #endif /* ACE_TESTS_REACTOR_PERFORMANCE_TEST_H */