diff options
author | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-31 23:01:12 +0000 |
---|---|---|
committer | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-31 23:01:12 +0000 |
commit | b0431ac3d3a72553dbed4e18b27bcb4a1367be79 (patch) | |
tree | e2ede5bd9cf510d827499697c5b84b7223a4ad33 /examples/QOS | |
parent | a5eb42c37efd4cdb0712f63f78bdbef215dd6106 (diff) | |
download | ATCD-b0431ac3d3a72553dbed4e18b27bcb4a1367be79.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples/QOS')
-rw-r--r-- | examples/QOS/QosEvent.h | 5 | ||||
-rw-r--r-- | examples/QOS/Sender_QOS_Event_Handler.cpp | 4 | ||||
-rw-r--r-- | examples/QOS/Sender_QOS_Event_Handler.h | 6 | ||||
-rw-r--r-- | examples/QOS/client.cpp | 4 | ||||
-rw-r--r-- | examples/QOS/server.cpp | 10 |
5 files changed, 19 insertions, 10 deletions
diff --git a/examples/QOS/QosEvent.h b/examples/QOS/QosEvent.h index 4080b2152b0..ee8080692bd 100644 --- a/examples/QOS/QosEvent.h +++ b/examples/QOS/QosEvent.h @@ -22,6 +22,11 @@ #define FALSE 0 #define MY_DEFPORT 5001 +#define QOS_NOT_SPECIFIED 0 + +#define SERVICETYPE_NOTRAFFIC 0x00000000 // No data in this direction. +#define SERVICETYPE_CONTROLLEDLOAD 0x00000002 // Controlled Load. +#define SERVICETYPE_GUARANTEED 0x00000003 // Guaranteed. // Application-specific define - there is NO specific invalid send // priority. This value is simply used to indicate whether or not to diff --git a/examples/QOS/Sender_QOS_Event_Handler.cpp b/examples/QOS/Sender_QOS_Event_Handler.cpp index 33d67368f73..96b10590769 100644 --- a/examples/QOS/Sender_QOS_Event_Handler.cpp +++ b/examples/QOS/Sender_QOS_Event_Handler.cpp @@ -22,7 +22,7 @@ ACE_QOS_Event_Handler::ACE_QOS_Event_Handler (void) } // Constructor. -ACE_QOS_Event_Handler::ACE_QOS_Event_Handler (const ACE_SOCK_Dgram_Mcast &dgram_mcast) +ACE_QOS_Event_Handler::ACE_QOS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast) : dgram_mcast_ (dgram_mcast) { } @@ -96,7 +96,7 @@ ACE_QOS_Event_Handler::handle_qos (ACE_HANDLE) ACE_OVERLAPPED ace_overlapped; iovec iov; - iov.iov_base = (void *) "Hello"; + iov.iov_base = (char *) "Hello"; iov.iov_len = 5; // For some really weird reason if I do not define the following diff --git a/examples/QOS/Sender_QOS_Event_Handler.h b/examples/QOS/Sender_QOS_Event_Handler.h index cd83c977d3b..ee9e5a5d4c8 100644 --- a/examples/QOS/Sender_QOS_Event_Handler.h +++ b/examples/QOS/Sender_QOS_Event_Handler.h @@ -20,7 +20,7 @@ #include "ace/Event_Handler.h" #include "ace/Reactor.h" #include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" +#include "ace/SOCK_Dgram_Mcast_QoS.h" #define MY_DEFPORT 5001 #define DEFAULT_MULTICASTGROUP "234.5.6.7" @@ -34,7 +34,7 @@ public: ACE_QOS_Event_Handler (void); // Constructor. - ACE_QOS_Event_Handler::ACE_QOS_Event_Handler (const ACE_SOCK_Dgram_Mcast &dgram_mcast); + ACE_QOS_Event_Handler::ACE_QOS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast); // Constructor. ~ACE_QOS_Event_Handler (void); @@ -50,7 +50,7 @@ public: private: - ACE_SOCK_Dgram_Mcast dgram_mcast_; + ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_; }; diff --git a/examples/QOS/client.cpp b/examples/QOS/client.cpp index 71de49dafb1..d9f06b30f4d 100644 --- a/examples/QOS/client.cpp +++ b/examples/QOS/client.cpp @@ -14,7 +14,7 @@ // // ============================================================================ -#include "ace/SOCK_Dgram_Mcast.h" +#include "ace/SOCK_Dgram_Mcast_QoS.h" #include "ace/OS.h" #define QOSEVENT_MAIN @@ -202,7 +202,7 @@ main (int argc, char * argv[]) // the sender and the receiver subscribe to the same multicast // addresses to make sure the "multicast sessions" for the two are // the same. This is used to match the RESV<->PATH states. - ACE_SOCK_Dgram_Mcast dgram_mcast; + ACE_SOCK_Dgram_Mcast_QoS dgram_mcast; // The windows example code uses PF_INET for the address family. // Winsock.h defines PF_INET to be AF_INET. Is there really a diff --git a/examples/QOS/server.cpp b/examples/QOS/server.cpp index fca38fa8107..69c7dad24df 100644 --- a/examples/QOS/server.cpp +++ b/examples/QOS/server.cpp @@ -16,7 +16,7 @@ #define QOSEVENT_MAIN -#include "ace/SOCK_Dgram_Mcast.h" +#include "ace/SOCK_Dgram_Mcast_QoS.h" #include "ace/OS.h" #include "ace/QoS_Session_Factory.h" #include "ace/QoS_Session.h" @@ -146,7 +146,7 @@ FillQoSParams (ACE_QoS_Params &qos_params, int main (int argc, char * argv[]) { - ACE_Protocol_Info protocol_info, *pinfo=0; + ACE_Protocol_Info *pinfo=0; OPTIONS options; @@ -198,7 +198,7 @@ main (int argc, char * argv[]) -1); // Opening a new Multicast Datagram. - ACE_SOCK_Dgram_Mcast dgram_mcast; + ACE_SOCK_Dgram_Mcast_QoS dgram_mcast; // The windows example code uses PF_INET for the address family. // Winsock.h defines PF_INET to be AF_INET. The following @@ -254,6 +254,8 @@ main (int argc, char * argv[]) // subscribe will be added that constrains the various features of // GQoS like different flags etc. + ACE_QoS_Manager *ace_qos_manager; + if (dgram_mcast.subscribe (mult_addr, qos_params, 1, @@ -266,6 +268,7 @@ main (int argc, char * argv[]) ACE_OVERLAPPED_SOCKET_FLAG | ACE_FLAG_MULTIPOINT_C_LEAF | ACE_FLAG_MULTIPOINT_D_LEAF, + ace_qos_manager, qos_session) == -1) ACE_ERROR_RETURN ((LM_ERROR, "Error in subscribe\n"), @@ -334,6 +337,7 @@ main (int argc, char * argv[]) // Set the QoS for the session. Replaces the ioctl () call that was // being made previously. if (qos_session->qos (&dgram_mcast, + ace_qos_manager, ace_qos) == -1) ACE_ERROR_RETURN ((LM_ERROR, "Unable to set QoS\n"), |