summaryrefslogtreecommitdiff
path: root/examples/QOS/Simple/Receiver_QoS_Event_Handler.h
blob: 35b6cd281ba9cc7d1a2e73f9f99d8b645b269820 (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
55
56
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    Receiver_QoS_Event_Handler.h
 *
 *  $Id$
 *
 *  @author Vishal Kachroo <vishal@cs.wustl.edu>
 */
//=============================================================================


#ifndef RECEIVER_QOS_EVENT_HANDLER_H
#define RECEIVER_QOS_EVENT_HANDLER_H

#include "ace/Reactor.h"
#include "ace/INET_Addr.h"
#include "ace/Event_Handler.h"
#include "ace/QoS/QoS_Session.h"
#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h"

class Receiver_QoS_Event_Handler : public ACE_Event_Handler
{
public:
  // = Initialization and Termination methods.
  /// Constructor.
  Receiver_QoS_Event_Handler (void);

  /// Constructor.
  Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast_qos,
                              ACE_QoS_Session *qos_session);

  /// Destructor.
  ~Receiver_QoS_Event_Handler (void);

  /// Override this to return the handle of the Dgram_Mcast
  /// that we are using.
  virtual ACE_HANDLE get_handle (void) const;

  /// Handles a READ event.
  virtual int handle_input (ACE_HANDLE fd);

  /// Handles a QoS event.
  virtual int handle_qos (ACE_HANDLE fd);

private:
  ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_;
  ACE_QoS_Session *qos_session_;
  ACE_INET_Addr remote_addr_;
};

#endif  /* RECEIVER_QOS_EVENT_HANDLER_H */