Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / IOStream / server / iostream_server.h
blob0e3b6bf6267d32bb61af739d25f16620345c2280
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>
21 // = TITLE
22 // Extend the <ACE_Svc_Handler> template to do our bidding.
24 // = DESCRIPTION
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.
30 public:
31 Handler ();
32 ~Handler ();
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 */