changeset 34:874e51b94623

ZeroMq uses different style of address for client and server
author adminsh@apollo
date Thu, 22 Mar 2012 08:42:03 +0000
parents f3a0641c1586
children 83c1f62d9370
files Messaging/Client/UI/MainWindow.xaml.cs Messaging/Common/Settings.cs Messaging/Server/UI/MainWindowViewModel.cs
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Messaging/Client/UI/MainWindow.xaml.cs	Thu Mar 22 08:11:42 2012 +0000
+++ b/Messaging/Client/UI/MainWindow.xaml.cs	Thu Mar 22 08:42:03 2012 +0000
@@ -77,7 +77,7 @@
                                           using (var ctx = new ZMQ.Context(1))
                                           {
                                               var socket = ctx.Socket(ZMQ.REQ);
-                                              socket.Connect("tcp://localhost:5555");
+                                              socket.Connect(Settings.ZeroMqClientAddress);
 
                                               for (var i = 0; i < MessageCount; i++)
                                               {
--- a/Messaging/Common/Settings.cs	Thu Mar 22 08:11:42 2012 +0000
+++ b/Messaging/Common/Settings.cs	Thu Mar 22 08:42:03 2012 +0000
@@ -5,6 +5,7 @@
         public const string MsmqQueueName = @".\private$\Queue#1";
         public const int RabbitPortNumber = 5672;
         public const string RabbitQueueName = "Queue#2";
-        public const string ZeroMqAddress = "tcp://*:5555";
+        public const string ZeroMqServerAddress = "tcp://*:5555";
+        public const string ZeroMqClientAddress = "tcp://localhost:5555";
     }
 }
--- a/Messaging/Server/UI/MainWindowViewModel.cs	Thu Mar 22 08:11:42 2012 +0000
+++ b/Messaging/Server/UI/MainWindowViewModel.cs	Thu Mar 22 08:42:03 2012 +0000
@@ -50,7 +50,7 @@
         {
             InitMsmqEndPoint(Settings.MsmqQueueName);
             InitRabbitEndPoint(Settings.RabbitPortNumber, Settings.RabbitQueueName);
-            InitZeroMqEndPoint(Settings.ZeroMqAddress);
+            InitZeroMqEndPoint(Settings.ZeroMqServerAddress);
 
             CloseCommand = new RelayCommand(CloseCommandExecute);
         }