/// <summary> /// Subscribe to all topics specified. /// </summary> public static void Subscribe(this IZmqSocket source, string[] topics) { foreach (var topic in topics) { source.Subscribe(topic); } }
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); }
/// <summary> /// Subscribe to everything a publisher sends. /// Internally sends an empty byte array /// </summary> public static void SubscribeAll(this IZmqSocket source) { source.Subscribe(""); }