Skip to content

Commit

Permalink
fixed another build error in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Mar 24, 2024
1 parent c5fce4a commit cd8b62d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/SuperSocket.Benchmarks/CurrentSend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ public async Task SendTest()

private async Task Send(ArrayPool<byte> pool, ConnectionOptions options, int iteration)
{
var channel = new TransparentPipeConnection<StringPackageInfo>(new CommandLinePipelineFilter(), options);
channel.Start();
var connection = new TransparentPipeConnection(options);

_ = connection.RunAsync(new CommandLinePipelineFilter());

for (var i = 0; i < iteration; i++)
{
var text = Guid.NewGuid().ToString() + "\r\n";
var buffer = pool.Rent(Encoding.UTF8.GetMaxByteCount(text.Length));
await channel.SendAsync(new ReadOnlyMemory<byte>(buffer));
await connection.SendAsync(new ReadOnlyMemory<byte>(buffer));
pool.Return(buffer);
}

await channel.CloseAsync(CloseReason.ServerShutdown);
await connection.CloseAsync(CloseReason.ServerShutdown);
}
}
}

0 comments on commit cd8b62d

Please sign in to comment.