mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-10-16 21:12:58 +08:00
5ef2f6ce69
When the channel was closed before all of the file content announced in a C record had been received, PipeStream.Read kept returning 0 and the copy loop spun forever. Throw an SshException in this case, matching ReadByte.
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Renci.SshNet.Tests.Common
|
|
{
|
|
/// <summary>
|
|
/// The outcome of <see cref="ScpServerTranscript.Run"/>.
|
|
/// </summary>
|
|
public sealed class ScpTranscriptResult
|
|
{
|
|
public ScpTranscriptResult(bool completed, Exception exception, IReadOnlyList<byte[]> sentData, IReadOnlyList<string> execRequests)
|
|
{
|
|
Completed = completed;
|
|
Exception = exception;
|
|
SentData = sentData;
|
|
ExecRequests = execRequests;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the operation finished within the timeout.
|
|
/// </summary>
|
|
public bool Completed { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the exception thrown by the operation, if any.
|
|
/// </summary>
|
|
public Exception Exception { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the data the client sent on the channel, one entry per send.
|
|
/// </summary>
|
|
public IReadOnlyList<byte[]> SentData { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the commands the client sent in exec requests.
|
|
/// </summary>
|
|
public IReadOnlyList<string> ExecRequests { get; }
|
|
}
|
|
}
|