mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-23 05:13:06 +08:00
reduced footprint of client msg queue and numbers can go even higher
This commit is contained in:
@@ -18,11 +18,16 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
public static async Task RunAsync()
|
||||
{
|
||||
var server = Task.Run(() => RunServerAsync());
|
||||
var client = Task.Run(() => RunClientAsync(300, TimeSpan.FromMilliseconds(10)));
|
||||
var client = Task.Run(() => RunClientAsync(400, TimeSpan.FromMilliseconds(10)));
|
||||
|
||||
await Task.WhenAll(server, client).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static Task RunClientsAsync(int msgChunkSize, TimeSpan interval)
|
||||
{
|
||||
return Task.WhenAll(Enumerable.Range(0, 3).Select((i) => Task.Run(() => RunClientAsync(msgChunkSize, interval))));
|
||||
}
|
||||
|
||||
private static async Task RunClientAsync( int msgChunkSize, TimeSpan interval )
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user