2 * Sample code from The ACE Programmer's Guide,
3 * copyright 2003 Addison-Wesley. All Rights Reserved.
6 #ifndef __CLIENTSERVICE_H_
7 #define __CLIENTSERVICE_H_
9 #include "ace/Synch_Traits.h"
10 #include "ace/Null_Condition.h"
11 #include "ace/Null_Mutex.h"
13 // Listing 3 code/ch07
14 #include "ace/Message_Block.h"
15 #include "ace/SOCK_Stream.h"
16 #include "ace/Svc_Handler.h"
19 public ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_NULL_SYNCH
>
21 typedef ACE_Svc_Handler
<ACE_SOCK_STREAM
, ACE_NULL_SYNCH
> super
;
24 int open (void * = 0);
26 // Called when input is available from the client.
27 virtual int handle_input (ACE_HANDLE fd
= ACE_INVALID_HANDLE
);
29 // Called when output is possible.
30 virtual int handle_output (ACE_HANDLE fd
= ACE_INVALID_HANDLE
);
32 // Called when this handler is removed from the ACE_Reactor.
33 virtual int handle_close (ACE_HANDLE handle
,
34 ACE_Reactor_Mask close_mask
);
38 #endif /* __CLIENTSERVICE_H_ */