2 * Sample code from The ACE Programmer's Guide,
3 * copyright 2003 Addison-Wesley. All Rights Reserved.
9 #include "ace/Synch_Traits.h"
10 #include "ace/Null_Condition.h"
11 #include "ace/Null_Mutex.h"
13 // Listing 1 code/ch07
14 #include "ace/Reactor.h"
15 #include "ace/INET_Addr.h"
16 #include "ace/SOCK_Stream.h"
17 #include "ace/SOCK_Connector.h"
18 #include "ace/Connector.h"
19 #include "ace/Svc_Handler.h"
20 #include "ace/Reactor_Notification_Strategy.h"
23 public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_NULL_SYNCH
>
25 typedef ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_NULL_SYNCH
> super
;
28 Client () : notifier_ (0, this, ACE_Event_Handler::WRITE_MASK
)
31 virtual int open (void * = 0);
33 // Called when input is available from the client.
34 virtual int handle_input (ACE_HANDLE fd
= ACE_INVALID_HANDLE
);
36 // Called when output is possible.
37 virtual int handle_output (ACE_HANDLE fd
= ACE_INVALID_HANDLE
);
39 // Called when a timer expires.
40 virtual int handle_timeout (const ACE_Time_Value
¤t_time
,
44 enum { ITERATIONS
= 5 };
46 ACE_Reactor_Notification_Strategy notifier_
;
50 #endif /* __CLIENT_H_ */