Back to product page

Notification property


Fast notification interface to use instead of events.

Type

A wodTunnelNotify object

Syntax

  • Basic
[Set] object.Notification [= wodTunnelNotify]  
The Notification(object,wodTunnelNotify) syntax has these parts:
objectAn expression evaluating to an object of type wodTunnel.
wodTunnelNotifyA wodTunnelNotify object.

Remarks

This method exists only in the DLL version of wodSSHTunnel.

The Notification property holds a reference to the IwodTunnelNotify interface, which can be implemented by your application. When this property is set and contains such a reference, wodTunnel will call your method implementations instead of firing events. More information on how this works can be found on the Fast Notifications Interface page.

For example, instead of having this in your code (VB example):
 
Private Sub Tunnel1_Connected()
 
End Sub
 

you will have this:
 
Private Sub IwodTunnelNotify_Connected(ByVal Owner As wodSSHTunnelCOMLib.IwodTunnelCom)
 
End Sub
 

Which is more or less the same, except the notification method has one more argument - Owner, which holds a reference to the wodTunnel instance that called this method.

In VB, to implement IwodTunnelNotify interface, you need code like this:

- at the top of the code, in the section, put this:
 
Dim Tunnel As wodTunnelCom
Implements IwodTunnelNotify
 

- in Form_Load (or where you initialize a new instance of wodTunnel) do this:
 
Set Tunnel = New wodTunnelCom
Set Tunnel.Notification = Me
Tunnel.Protocol = SSHAuto
Tunnel.Timeout = 30
Tunnel.Connect
'...



You will notice that when we declared wodTunnel, we did not use the WithEvents keyword. It is not needed anymore, because events will not be fired - the Notification methods we implement will be called instead.

Platforms

Windows