Subject: Using WaitForData() method
Date: 2016-03-07 19:34:04
From: Norm Schaeffer
Source: using-waitfordata-method
----------------------------------------------------------------------

I'm not exactly sure how the WaitForData method works.

I have the following code:

[code lang='c#']

private void btnWaitForData_Click(object sender EventArgs e)

{

  string severData;

  sshTerminalControl.AutoProcessing = false;

  sshTerminalControl.WaitForData();

  serverData = sshTerminalControl.ReceivedData;

}

[/code]

The string serverData returns null even though I see data returned in sshTerminalControl textbox.

I'm trying to use the ssh client in a class, so I want to use a method rather than raise an event.

The documentation doesn't have an example for WaitForData().

 

Thanks.

 

 
---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index