Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# EC_Gateway_UDP.h File Reference

`#include "ace/pre.h"`
`#include "orbsvcs/RtecUDPAdminS.h"`
`#include "orbsvcs/RtecEventChannelAdminS.h"`
`#include "orbsvcs/Event/event_export.h"`
`#include "ace/SOCK_Dgram_Mcast.h"`
`#include "ace/SOCK_CODgram.h"`
`#include "ace/Hash_Map_Manager.h"`
`#include "ace/post.h"`

Include dependency graph for EC_Gateway_UDP.h:

This graph shows which files directly or indirectly include this file:

## Compounds
class | TAO_ECG_UDP_EH
| Event Handler for UDP messages. More...
class | TAO_ECG_UDP_Out_Endpoint
| Maintains information about an outgoing endpoint. More...
class | TAO_ECG_UDP_Receiver
| Decodes events from an ACE_SOCK_Dgram and pushes them to the Event_Channel. More...
class | TAO_ECG_UDP_Request_Entry
| Keeps information about an incomplete request. More...
class | TAO_ECG_UDP_Request_Index
| Index to the request map. More...
class | TAO_ECG_UDP_TH
| Timer Handler for the UDP Receivers. More...

## Detailed Description

EC_Gateway_UDP.h,v 1.31 2002/01/29 20:20:49 okellogg Exp

Author:
  Carlos O'Ryan (coryan@cs.wustl.edu)

Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and other members of the DOC group. More details can be found in:

http://doc.ece.uci.edu/~coryan/EC/index.html

Define helper classes to propagate events between ECs using either UDP or multicast. The architecture is a bit complicated and deserves some explanation: sending the events over UDP (or mcast) is easy, a Consumer (TAO_ECG_UDP_Sender) subscribes for a certain set of events, its push() method marshalls the event set into a CDR stream that is sent using an ACE_SOCK_CODgram. The subscription set and IP address can be configured. Another helper class (TAO_ECG_UDP_Receiver) acts as a supplier of events; it receives a callback when an event is available on an ACE_SOCK_Dgram, it demarshalls the event and pushes it to the EC. Two ACE_Event_Handler classes are provided that can forward the events to this Supplier: TAO_ECG_Mcast_EH can receive events from a multicast group; TAO_ECG_UDP_EH can receive events from a regular UDP socket.

Matching of the events types carried by a multicast group (or IP address) is up to the application. Gateway classes can be implemented to automate this: the EC informs its gateways about local changes in the subscriptions (for example), the Gateway could then consult an administrative server that will inform it which multicast groups carry those event types, it can then create the proper event handlers and TAO_ECG_Receivers. An analogous class can be implemented for the Supplier side.

An alternative approach would be to look the current set of multicast groups and the events carried on each, using that information a suitable TAO_ECG_UDP_Receiver can be configured (and of course the Senders on the client side).

Todo:
  The class makes an extra copy of the events, we need to investigate if closer collaboration with its collocated EC could be used to remove that copy.