summaryrefslogtreecommitdiff
path: root/examples/QOS
diff options
context:
space:
mode:
Diffstat (limited to 'examples/QOS')
-rw-r--r--examples/QOS/QosEvent.h13
-rw-r--r--examples/QOS/Sender_QOS_Event_Handler.cpp7
-rw-r--r--examples/QOS/client.cpp33
-rw-r--r--examples/QOS/server.cpp29
4 files changed, 21 insertions, 61 deletions
diff --git a/examples/QOS/QosEvent.h b/examples/QOS/QosEvent.h
index 822ebef01a1..90c99760fe1 100644
--- a/examples/QOS/QosEvent.h
+++ b/examples/QOS/QosEvent.h
@@ -47,6 +47,17 @@
#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
#define QOS_NOT_SPECIFIED 0xFFFFFFFF
+#define SERVICETYPE_NOTRAFFIC 0x00000000 // No data in this direction.
+#define SERVICETYPE_CONTROLLEDLOAD 0x00000002 // Controlled Load.
+#define SERVICETYPE_GUARANTEED 0x00000003 // Guaranteed.
+
+#define JL_SENDER_ONLY 0x01
+#define JL_BOTH 0x04
+
+#define SIO_GET_QOS (0x40000000 | 0x08000000 | 7)
+#define SIO_MULTIPOINT_LOOPBACK (0x08000000 | 9)
+#define SIO_MULTICAST_SCOPE (0x08000000 | 10)
+#define SIO_SET_QOS (0x08000000 | 11)
#endif /* ACE_HAS_WINSOCK2 */
@@ -206,8 +217,6 @@ ACE_Flow_Spec default_g711 (9200,
1);
-SOCKADDR_IN g_destaddr;
-
#else
extern FLOWSPEC default_notraffic;
diff --git a/examples/QOS/Sender_QOS_Event_Handler.cpp b/examples/QOS/Sender_QOS_Event_Handler.cpp
index f1c61177178..06c0d385259 100644
--- a/examples/QOS/Sender_QOS_Event_Handler.cpp
+++ b/examples/QOS/Sender_QOS_Event_Handler.cpp
@@ -52,7 +52,12 @@ ACE_QOS_Event_Handler::handle_qos (ACE_HANDLE)
"\nReceived a QOS event. Inside handle_qos ()\n"));
ACE_OVERLAPPED ace_overlapped;
- const iovec iov = {5, "Hello"};
+
+#if (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
+ const iovec iov = {5,"Hello"};
+#else
+ const iovec iov = {"Hello", 5};
+#endif
// For some really weird reason if I do not define the following
// sockaddr_in, the send () call fails.
diff --git a/examples/QOS/client.cpp b/examples/QOS/client.cpp
index 366900b45e8..04f7bb15804 100644
--- a/examples/QOS/client.cpp
+++ b/examples/QOS/client.cpp
@@ -17,7 +17,7 @@
#include "ace/OS.h"
#define QOSEVENT_MAIN
-#include "qosevent.h"
+#include "QosEvent.h"
#include "Sender_QOS_Event_Handler.h"
static u_short SERVER_PORT = MY_DEFPORT;
@@ -43,35 +43,6 @@ static const u_short PORT = ACE_DEFAULT_SERVER_PORT;
// depending upon whether this application is acting as a sender or
// receiver.
-static void
-FillQosFlowspecDefault (QOS *pQos,
- u_long *cbQosLen,
- QOS_OPTIONS *pQosOptions)
-{
- if (pQosOptions->bReceiver)
- {
- pQos->ReceivingFlowspec = default_g711;
- pQos->SendingFlowspec = default_notraffic;
- }
- else
- {
- pQos->SendingFlowspec = default_g711;
- pQos->ReceivingFlowspec = default_notraffic;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Enabling QOS Signalling for the sender.\n"));
-
- // Enable the QOS signalling.
- ACE_CLR_BITS (pQos->ReceivingFlowspec.ServiceType,
- SERVICE_NO_QOS_SIGNALING);
-
- pQos->ProviderSpecific.len = 0;
- pQos->ProviderSpecific.buf = 0;
- *cbQosLen = sizeof (QOS) + pQos->ProviderSpecific.len;
-}
-
-
static int
fill_ace_qos_flowspec_default (ACE_QoS *pQos,
QOS_OPTIONS *pQosOptions)
@@ -372,7 +343,9 @@ FindServiceProvider(int iProtocol,
int bMulticast,
ACE_Protocol_Info *pProtocolInfo)
{
+
ACE_Protocol_Info *protocol_buffer = 0;
+
u_long buffer_length = 0;
u_long dwErr;
int bProtocolFound = FALSE;
diff --git a/examples/QOS/server.cpp b/examples/QOS/server.cpp
index acbeb51330c..cf57c08e9f6 100644
--- a/examples/QOS/server.cpp
+++ b/examples/QOS/server.cpp
@@ -19,7 +19,7 @@
#include "ace/SOCK_Dgram_Mcast.h"
#include "ace/OS.h"
-#include "qosevent.h"
+#include "QosEvent.h"
#include "Receiver_QOS_Event_Handler.h"
static int ValidOptions (char *argv[],
@@ -41,33 +41,6 @@ static const u_short PORT = ACE_DEFAULT_SERVER_PORT;
// depending upon whether this application is acting as a sender or
// receiver.
-static void FillQosFlowspecDefault (QOS *pQos,
- u_long *cbQosLen,
- QOS_OPTIONS *pQosOptions)
-{
- if (pQosOptions->bReceiver)
- {
- pQos->ReceivingFlowspec = default_g711;
- pQos->SendingFlowspec = default_notraffic;
- }
- else
- {
- pQos->SendingFlowspec = default_g711;
- pQos->ReceivingFlowspec = default_notraffic;
- }
-
- ACE_DEBUG ((LM_DEBUG,
- "Enabling the QOS Signalling for the receiver.\n"));
-
- // Enable the QOS signalling.
- ACE_CLR_BITS (pQos->ReceivingFlowspec.ServiceType,
- SERVICE_NO_QOS_SIGNALING);
-
- pQos->ProviderSpecific.len = 0;
- pQos->ProviderSpecific.buf = 0;
- *cbQosLen = sizeof (QOS) + pQos->ProviderSpecific.len;
-}
-
static int
fill_ace_qos_flowspec_default (ACE_QoS *pQos,
QOS_OPTIONS *pQosOptions)