// 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.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Http.Features
{
///
/// Provides an efficient mechanism for transferring files from disk to the network.
///
public interface IHttpSendFileFeature
{
///
/// Sends the requested file in the response body. This may bypass the IHttpResponseFeature.Body
/// . A response may include multiple writes.
///
/// The full disk path to the file.
/// The offset in the file to start at.
/// The number of bytes to send, or null to send the remainder of the file.
/// A used to abort the transmission.
///
Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation);
}
}