Esempio n. 1
0
 public static void Main(string[] args)
 {
     using (var context = ZmqContext.Create())
     {
         using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5559", "tcp://*:5560"))
         {
         }
     }
 }
Esempio n. 2
0
 public static void Main(string[] args)
 {
     using (var context = ZmqContext.Create())
     {
         using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5559", "tcp://*:5560"))
         {
             
         }
     }
 }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            using (var context = ZmqContext.Create())
            {

                using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5555", "inproc://workers"))
                {
                    var workerThreads = new Thread[5];
                    for (int threadId = 0; threadId < workerThreads.Length; threadId++)
                    {
                        workerThreads[threadId] = new Thread(WorkerRoutine);
                        workerThreads[threadId].Start(context);
                    }
                }

            }
        }
Esempio n. 4
0
        private void SendReceiveWithDevice()
        {
            using (var broker = new ZeroMQ.Devices.QueueDevice(this.zmqContext, this.frontendAddress, this.backendAddress, ZeroMQ.Devices.DeviceMode.Blocking))
            {
                try
                {
                    broker.Start();

                    //while (Interlocked.Read(ref this.running) == 1)
                    //{

                    //}
                }
                finally
                {
                    broker.Stop();
                }
            }
        }
Esempio n. 5
0
        private void SendReceiveWithDevice()
        {
            using (var broker = new ZeroMQ.Devices.QueueDevice(this.zmqContext, this.frontendAddress, this.backendAddress, ZeroMQ.Devices.DeviceMode.Blocking))
            {
                try
                {
                    broker.Start();

                    //while (Interlocked.Read(ref this.running) == 1)
                    //{

                    //}
                }
                finally
                {
                    broker.Stop();
                }
            }
        }