Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using NetMQ;
- using System.Threading;
- namespace Subscriber
- {
- class Program
- {
- static void Main(string[] args)
- {
- byte[] array1 = new byte[1920 * 1080 * 4];
- int msgNumber = 0;
- using (var context = NetMQContext.Create())
- {
- using (var subscriber = context.CreateSubscriberSocket())
- {
- subscriber.Options.ReceiveHighWatermark = 1;
- subscriber.Subscribe("TopicTest");
- subscriber.Connect("tcp://localhost:5555");
- while (true)
- {
- byte[] topic = subscriber.Receive();
- byte[] message = subscriber.Receive();
- msgNumber++;
- Console.WriteLine(msgNumber.ToString());
- Thread.Sleep(10);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment