Blocking and Non-Blocking mode in the same program - WeOnlyDo Discussion board

Blocking and Non-Blocking mode in the same program (wodSSH / wodSSH.NET)

by zubenelgenubi, Tuesday, August 24, 2010, 14:58 (4994 days ago)

Hi,

We have a program that we are developing for managing network connectivity on Cisco devices. For some time we have been using SSH.Net to connect to devices in 'Non-blocking' mode. Our program reads data in the DataReceived event.

We want to add another feature to the same program. This time we want to use the SSH.Net component in 'Blocking' mode. During testing we are receiving a error in the DataReceived event. The error is thrown at teh following line:

s = Ssh1.Receive();

The error is: Timeout occurred due to inactivity.

So, the question is: Is it possible to use the SSH.Net component in both blocking and non-blocking mode from within the same program? What has to happen in order to allow this to work reliably?

TIA


Complete thread: