Esempio n. 1
0
 /// <summary>
 /// Unsubscribe from all topics specified.
 /// </summary>
 public static void Unsubscribe(this IZmqSocket source, string[] topics)
 {
     foreach (var topic in topics)
     {
         source.Unsubscribe(topic);
     }
 }
Esempio n. 2
0
        public void UnsubscribeFromTopic(string topic)
        {
            if (topic == null)
            {
                throw new ArgumentNullException("topic");
            }
            if (!_started)
            {
                throw new InvalidOperationException("Cannot unsubscribe before starting it");
            }

            lock (_socket)
                _socket.Unsubscribe(topic);
        }
Esempio n. 3
0
 /// <summary>
 /// Unsubscribe to everything a publisher sends.
 /// Internally sends an empty byte array
 /// </summary>
 public static void UnsubscribeAll(this IZmqSocket source)
 {
     source.Unsubscribe("");
 }