Back to product page

Blocking property


Determine if methods are blocking.

Type

Boolean. True forces wodSSH.NET to execute methods in blocking manner - waits until method completes.

Syntax

  • C#
  • VB.NET
Boolean Blocking {get; set; };

Property Blocking As Boolean

Remarks

Blocking mode is ideal for scripting environments when you cannot use asynchronous connections. Although events are still fired, you can just ignore them and check if error occurred during method execution.

Difference between blocking and non-blocking operation may be shown using Connect method:
  • If Blocking is set to True, wodSSH.NET will wait until it actually connects with remote server. Once connected, control will be given back to your program and you can continue with execution of it. If an error is generated, it will be returned immediately.
  • If Blocking is set to False, wodSSH.NET will immediately return once Connect is called, no matter if it managed to connect with remote server or not (at that particular moment). Later, you should wait for Connected event to be fired to determine if connection is successful or not.

Platforms

Windows