SecureBlackbox 2020 .NET Edition

Questions / Feedback?

DataReceived Event

Reports receipt of another chunk of data from the server.

Syntax

public event OnDataReceivedHandler OnDataReceived;

public delegate void OnDataReceivedHandler(object sender, SshclientDataReceivedEventArgs e);

public class SshclientDataReceivedEventArgs : EventArgs {
  public int Channel { get; }
  public int BytesReceived { get; }
  public int TotalBytesPending { get; }
}
Public Event OnDataReceived As OnDataReceivedHandler

Public Delegate Sub OnDataReceivedHandler(sender As Object, e As SshclientDataReceivedEventArgs)

Public Class SshclientDataReceivedEventArgs Inherits EventArgs
  Public ReadOnly Property Channel As Integer
  Public ReadOnly Property BytesReceived As Integer
  Public ReadOnly Property TotalBytesPending As Integer
End Class

Remarks

This event fires in asynchronous mode to report the receipt of another chunk of data from the server. Use Receive or ReceiveBytes methodsto read out the received data.

The Channel parameter indicates the channel on which the data was received: stdout (0) or stderr (1). BytesReceived specify the size of the newly received chunk, and TotalBytesPending contain the total number of bytes available for reading.

Please note that just like other asynchronous mode events this event may fire from a secondary thread. Please make sure your code is prepared for that by using appropriate synchronization facilities.

This event does not fire in synchronous mode.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 .NET Edition - Version 20.0 [Build 8165]