Back to product page

Blocking property


Determines if methods are blocking.

Type

A Boolean value. When set to True, methods are blocking.

Syntax

  • Basic
object.Blocking [= value]
The Blocking(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodSSH.
valueA Boolean value.

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 to see if an error occurred during method execution.

The different behavior of blocking and non-blocking operations can be illustrated using the Connect method.

If Blocking is set to True, wodSSH will wait until it actually connects with the remote server before returning control. Once connected, control will be passed back to your program and you can continue with its execution. If an error is generated, control will be returned immediately.

If Blocking is set to False, wodSSH will immediately return after Connect is called, whether it managed to connect with the remote server (at that particular moment) or not. Following the call to Connect, you should wait for the Connected event to be fired to determine if Connect was successful or not.

Platforms

Windows