aspnetcore/test/Microsoft.AspNetCore.Server.../TestHelpers/MockSocketOuptut.cs

33 lines
999 B
C#

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure;
namespace Microsoft.AspNetCore.Server.KestrelTests.TestHelpers
{
public class MockSocketOuptut : ISocketOutput
{
public void ProducingComplete(MemoryPoolIterator end)
{
}
public MemoryPoolIterator ProducingStart()
{
return new MemoryPoolIterator();
}
public void Write(ArraySegment<byte> buffer, bool chunk = false)
{
}
public Task WriteAsync(ArraySegment<byte> buffer, bool chunk = false, CancellationToken cancellationToken = default(CancellationToken))
{
return TaskUtilities.CompletedTask;
}
}
}