mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-20 07:37:46 +08:00
f754c83069
* [0.7.2] Start threads as background in HashedWheelTimer, LoopExecutor, ThreadDeathWatcher * + code formatting * [0.7.3] Target net5 and net6 (#2) target net5 and net6 Adopted TlsHandler for the case when Handshake completion callback is dispatched asynchronously to thread pool Introduced SingleThreadedEmbededChannel for TlsHandler and SniHandler tests * + Update DotNetVersion to "6.0.302" in build.ps1
22 lines
714 B
C#
22 lines
714 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
namespace DotNetty.Handlers.Tests
|
|
{
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
using DotNetty.Buffers;
|
|
using DotNetty.Common.Utilities;
|
|
using DotNetty.Transport.Channels.Embedded;
|
|
|
|
class AsIsWriteStrategy : IWriteStrategy
|
|
{
|
|
public Task WriteToChannelAsync(IEmbeddedChannel channel, ArraySegment<byte> input)
|
|
{
|
|
channel.WriteInbound(Unpooled.WrappedBuffer(input.Array, input.Offset, input.Count));
|
|
return TaskEx.Completed;
|
|
}
|
|
|
|
public override string ToString() => "as-is";
|
|
}
|
|
} |