/// <summary> Registers the given ConnectionListener with the HL7Service - when a remote host /// makes a new Connection, all registered listeners will be notified. /// </summary> public virtual void registerConnectionListener(NuGenConnectionListener listener) { lock (this) { this.listeners.Add(listener); } }
/// <summary>Notifies all listeners that a Connection is new or discarded. </summary> private void notifyListeners(NuGenConnection c) { for (int i = 0; i < listeners.Count; i++) { NuGenConnectionListener cl = (NuGenConnectionListener)listeners[i]; if (c.Open) { cl.connectionReceived(c); } else { cl.connectionDiscarded(c); } } }
/// <summary> Registers the given ConnectionListener with the HL7Service - when a remote host /// makes a new Connection, all registered listeners will be notified. /// </summary> public virtual void registerConnectionListener(NuGenConnectionListener listener) { lock (this) { this.listeners.Add(listener); } }