public IFABChannelGroup Flush(IFABChannelMatcher matcher) { foreach (IFABChannel c in this.nonServerChannels.Values) { if (matcher.Matches(c)) { c.Flush(); } } return(this); }
public Task NewCloseFuture(IFABChannelMatcher matcher) { Contract.Requires(matcher != null); var futures = new Dictionary <IFABChannel, Task>(); foreach (IFABChannel c in this.nonServerChannels.Values) { if (matcher.Matches(c)) { futures.Add(c, c.CloseCompletion); } } foreach (IFABChannel c in this.serverChannels.Values) { if (matcher.Matches(c)) { futures.Add(c, c.CloseCompletion); } } return(new FABChannelGroupCompletionSource(this, futures /*, this.executor*/).Task); }
public Task WriteAsync(FABMessage message, IFABChannelMatcher matcher) { Contract.Requires(message != null); Contract.Requires(matcher != null); var futures = new Dictionary <IFABChannel, Task>(); foreach (FABChannel c in this.nonServerChannels.Values) { if (matcher.Matches(c)) { futures.Add(c, c.WriteAsync(SafeDuplicate(message))); } } ReferenceCountUtil.Release(message); return(new FABChannelGroupCompletionSource(this, futures /*, this.executor*/).Task); }