Merge branch 'master' into jwi-bcc64xsingletonwarning
[ACE_TAO.git] / ACE / examples / Reactor / Proactor / test_cancel.h
blob7b2dc6f9dfcb9d3baba3ee2b31a5f50b24289e37
1 /*
2 **
3 */
5 #ifndef _TEST_CANCEL_H
6 #define _TEST_CANCEL_H
8 #include "ace/Asynch_IO.h"
10 class Receiver : public ACE_Service_Handler
12 // = TITLE
14 // Receiver
16 // = DESCRIPTION
18 // The class will be created by ACE_Asynch_Acceptor when new
19 // connections arrive. This class will then receive data from
20 // the network connection and dump it to a file.
22 public:
23 Receiver ();
24 ~Receiver ();
26 virtual void open (ACE_HANDLE handle,
27 ACE_Message_Block &message_block);
28 // This is called after the new connection has been accepted.
30 protected:
31 // These methods are called by the framework
33 virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result);
34 // This is called when asynchronous read from the socket complete
36 private:
37 ACE_Asynch_Read_Stream rs_;
38 // rs (read stream): for reading from a socket
40 ACE_Message_Block mb_;
41 // Message block to read from the stream.
43 ACE_HANDLE handle_;
44 // Handle for IO to remote peer
47 #endif /* _TEST_CANCEL_H */