2
* Client.h,v 1.2 2004/01/07 22:40:16 shuston Exp
4
* Sample code from The ACE Programmer's Guide,
5
* copyright 2003 Addison-Wesley. All Rights Reserved.
11
#include "ace/Synch_Traits.h"
12
#include "ace/Null_Condition.h"
13
#include "ace/Null_Mutex.h"
15
// Listing 1 code/ch07
16
#include "ace/Reactor.h"
17
#include "ace/INET_Addr.h"
18
#include "ace/SOCK_Stream.h"
19
#include "ace/SOCK_Connector.h"
20
#include "ace/Connector.h"
21
#include "ace/Svc_Handler.h"
22
#include "ace/Reactor_Notification_Strategy.h"
25
public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
27
typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> super;
30
Client () : notifier_ (0, this, ACE_Event_Handler::WRITE_MASK)
33
virtual int open (void * = 0);
35
// Called when input is available from the client.
36
virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
38
// Called when output is possible.
39
virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE);
41
// Called when a timer expires.
42
virtual int handle_timeout (const ACE_Time_Value ¤t_time,
46
enum { ITERATIONS = 5 };
48
ACE_Reactor_Notification_Strategy notifier_;
52
#endif /* __CLIENT_H_ */