SFTP.Blocking Property

Determine if methods are blocking.

[Visual Basic]
Public Property Blocking As Boolean
[C#]
public bool Blocking {get; set;}

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, wodSFTP.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, wodSFTP.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.

Above applies also to all methods used in wodSFTP.NET (such as ReadDir, MakeDir...). If an error occurs, it will be returned when method finished.

See Also

SFTP Class | SFTP Members | WeOnlyDo.Client Namespace