示例#1
0
 private Task WriteToRandomAvailableConnection(ServiceMessage serviceMessage)
 {
     return(WriteWithRetry(serviceMessage, StaticRandom.Next(-FixedConnectionCount, FixedConnectionCount), FixedConnectionCount));
 }
 public async Task WriteAsync(ServiceMessage serviceMessage)
 {
     var   index = StaticRandom.Next(_serviceConnections.Count);
     await _serviceConnections[index].WriteAsync(serviceMessage);
 }