summaryrefslogtreecommitdiff
path: root/ACE/ace/PIP_Active_IO_Handler.h
blob: b50b606b2e25e5a16d1275f0fda74f9b7790ef23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 /**
  * @file PIP_Active_IO_Handler.h
  *
  * // $Id$
  *
  * @author John Moore <ljohn7@gmail.com>
  *
  * This file contains the specification for a class
  * that manages network I/O in a dedicated thread
*/


#ifndef _PIP_ACTIVE_IO_HANDLER_H_
#define _PIP_ACTIVE_IO_HANDLER_H_

#include "ace/PIP_IO_Handler.h"

/**
 * @class ACE_PIP_Active_IO_Handler
 *
 * @brief Performs network I/O in a dedicated thread
 *
 * @author John Moore <ljohn7@gmail.com>
 */
class ACE_Export ACE_PIP_Active_IO_Handler : 
   public ACE_PIP_IO_Handler
{
  public:
  
   /// Constructor
   ACE_PIP_Active_IO_Handler ();
   
   /// Enqueue a message to be sent
   virtual int put_message (ACE_PIP_Protocol_Message* message);

   /// Closes all remote connections.
   virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask);

   /// Performs message I/O
   virtual int svc();

   /// Shuts down the service. Result is handler deactivated and
   /// deleted
   void shutdown_svc();

   virtual int open(void* = 0);

 private:

   bool shutdown_;
   ACE_Mutex shutdown_lock_;
};

#endif /* _PIP_Active_IO_Handler_H_ */