summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/AV/UDP.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV/UDP.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/UDP.h50
1 files changed, 43 insertions, 7 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/UDP.h b/TAO/orbsvcs/orbsvcs/AV/UDP.h
index d1817e52c02..b070df990a4 100644
--- a/TAO/orbsvcs/orbsvcs/AV/UDP.h
+++ b/TAO/orbsvcs/orbsvcs/AV/UDP.h
@@ -91,6 +91,8 @@ public:
int iovcnt,
ACE_Time_Value *s = 0);
+ TAO_AV_UDP_Flow_Handler *handler (void) { return this->handler_; }
+
protected:
TAO_AV_UDP_Flow_Handler *handler_;
ACE_Addr *addr_;
@@ -109,7 +111,7 @@ public:
///Ctor
/// Dtor
TAO_AV_UDP_Flow_Handler (void);
- ~TAO_AV_UDP_Flow_Handler (void);
+ virtual ~TAO_AV_UDP_Flow_Handler (void);
int open (ACE_Addr &address);
virtual TAO_AV_Transport *transport (void);
virtual int set_remote_address (ACE_Addr *address);
@@ -119,7 +121,7 @@ public:
const ACE_SOCK_Dgram *get_socket (void) const;
virtual ACE_Event_Handler* event_handler (void){ return this; }
/// Change the QoS
- virtual int change_qos (AVStreams::QoS);
+ virtual int change_qos (AVStreams::QoS);
protected:
TAO_AV_Core *av_core_;
@@ -140,21 +142,30 @@ public:
virtual int open (TAO_Base_StreamEndPoint *endpoint,
TAO_AV_Core *av_core,
TAO_FlowSpec_Entry *entry,
- TAO_AV_Flow_Protocol_Factory *factory);
+ TAO_AV_Flow_Protocol_Factory *factory,
+ TAO_AV_Core::Flow_Component flow_comp =
+ TAO_AV_Core::TAO_AV_DATA);
virtual int open_default (TAO_Base_StreamEndPoint *endpoint,
TAO_AV_Core *av_core,
TAO_FlowSpec_Entry *entry,
- TAO_AV_Flow_Protocol_Factory *factory);
+ TAO_AV_Flow_Protocol_Factory *factory,
+ TAO_AV_Core::Flow_Component flow_comp =
+ TAO_AV_Core::TAO_AV_DATA);
- virtual int open_i (ACE_INET_Addr *address);
+ virtual int open_i (ACE_INET_Addr *address, int is_default_open);
virtual int close (void);
virtual int activate_svc_handler (TAO_AV_Flow_Handler *handler);
+
+
protected:
TAO_Base_StreamEndPoint *endpoint_;
TAO_FlowSpec_Entry *entry_;
TAO_AV_Flow_Protocol_Factory *flow_protocol_factory_;
+ TAO_AV_Core::Flow_Component flow_component_;
+
+
};
/**
@@ -172,7 +183,9 @@ public:
TAO_AV_Flow_Protocol_Factory *factory);
virtual int connect (TAO_FlowSpec_Entry *entry,
- TAO_AV_Transport *&transport);
+ TAO_AV_Transport *&transport,
+ TAO_AV_Core::Flow_Component flow_comp =
+ TAO_AV_Core::TAO_AV_DATA);
virtual int activate_svc_handler (TAO_AV_Flow_Handler *handler);
virtual int close (void);
protected:
@@ -180,6 +193,29 @@ protected:
TAO_AV_Core *av_core_;
TAO_FlowSpec_Entry *entry_;
TAO_AV_Flow_Protocol_Factory *flow_protocol_factory_;
+ TAO_AV_Core::Flow_Component flow_component_;
+
+};
+
+/**
+ * @class TAO_AV_UDP_Connection_Setup
+ * @brief This class is a helper for the TAO_AV_UDP_Acceptor and
+ * TAO_AV_UDP_Connector. It basically just reduces duplicate code. It takes
+ * the address of the peer in the connection, whether or not it is a multicast
+ * connection, and whether it is a connector or acceptor; and creates the local
+ * address and flow handler associated with the connection.
+ */
+class TAO_AV_Export TAO_AV_UDP_Connection_Setup
+{
+public:
+ /// Indicates whether this setup is for a Connector or an Acceptor
+ enum ConnectionType {CONNECTOR, ACCEPTOR};
+
+ static int setup (TAO_AV_Flow_Handler *&flow_handler,
+ ACE_INET_Addr *inet_addr,
+ ACE_INET_Addr *&local_addr,
+ int is_multicast,
+ ConnectionType ct);
};
/**
@@ -218,7 +254,7 @@ private:
/**
* @class TAO_AV_UDP_Flow_Factory
- * @brief
+ * @brief
*/
class TAO_AV_Export TAO_AV_UDP_Flow_Factory : public TAO_AV_Flow_Protocol_Factory
{