1 // This file defines the class needed for iostream_server.cpp - it's a separate
2 // file to satisfy IBM's xlC template instantiation.
4 #ifndef __IOSTREAM_SERVER_H
5 #define __IOSTREAM_SERVER_H
7 #include "ace/INET_Addr.h"
8 #include "ace/IOStream.h"
9 #include "ace/SOCK_Stream.h"
10 #include "ace/Svc_Handler.h"
12 #if !defined (ACE_LACKS_ACE_IOSTREAM)
14 // Declare a new type which will case an ACE_SOCK_Stream to behave
15 // like an iostream. The new ACE_SOCK_IOStream type can be used
16 // anywhere an ACE_SOCK_Stream is used.
18 typedef ACE_IOStream
<ACE_SOCK_Stream
> ACE_SOCK_IOStream
;
20 class Handler
: public ACE_Svc_Handler
<ACE_SOCK_IOStream
, ACE_NULL_SYNCH
>
22 // Extend the <ACE_Svc_Handler> template to do our bidding.
25 // Create an <ACE_Svc_Handler> object based on our
26 // iostream/SOCK_Stream hybrid. All of this is fairly standard
27 // until we get to the <handle_input> where we begin using the
28 // iostream characteristics of the peer.
34 // = <Svc_Handler> hooks.
35 virtual int open (void *);
37 // = <Event_Handler> hooks.
38 virtual int handle_input (ACE_HANDLE
);
41 #endif /* ACE_LACKS_ACE_IOSTREAM */
43 #endif /* __IOSTREAM_SERVER_H */