Пример #1
0
 /// <summary>
 /// Subscribe to all topics specified.
 /// </summary>
 public static void Subscribe(this IZmqSocket source, string[] topics)
 {
     foreach (var topic in topics)
     {
         source.Subscribe(topic);
     }
 }
Пример #2
0
        public void SubscribeToTopic(string topic)
        {
            if (topic == null)
            {
                throw new ArgumentNullException("topic");
            }
            if (!_started)
            {
                throw new InvalidOperationException("Cannot subscribe before starting it");
            }

            lock (_socket)
                _socket.Subscribe(topic);
        }
Пример #3
0
 /// <summary>
 /// Subscribe to everything a publisher sends.
 /// Internally sends an empty byte array
 /// </summary>
 public static void SubscribeAll(this IZmqSocket source)
 {
     source.Subscribe("");
 }