Back to product page

Fast notifications interface


Basic information

As you might have read elsewhere, wodSSHCom can use a fast notification interface instead of firing events. This means that each time wodSSH would normally fire an event, it will call your implementation of the event instead. Notifications can be 30 times faster than events - meaning it is advisable to use them if performance is a requirement of your applications.

wodSSH ActiveX DOES NOT support notifications - only the wodSSHCom component does!

You must declare ALL notification methods if you want to implement IwodSSHNotify, no matter whether you need them or not. For example, many users don't need the HostFingerprint event, but at least the empty body for this event MUST exist when notifications are used.

You can read below the steps that are required to implement your own IwodSSHNotify interface. As an example, we will put it on the main form. You can also put it into a separate VB class, in which case instead of the 'Me' keyword, you will use name of the class.

Steps needed to implement IwodSSHNotify

1. Add a Reference to the wodSSHCom COM Object to your application

2. Instead of declaring wodSSH like this:
 
Dim WithEvents Ssh1 as wodSSHCom
 

you should do this:
 
Dim Ssh1 as wodSSHCom
Implements IwodSSHNotify
 

3. In Form_Load, create new instance for Ssh1, and pass reference of our IwodSSHNotify to it
 
Set Ssh1 = new wodSSHCom
Set Ssh1.Notification = Me
 

4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate the 'IwodSSHNotify' object in the list of all objects that exist on your form (combo box in upper left corner of your code view), or just can do it by hand.

5. All done. Now put breakpoints into your methods. You will see that instead of the event firing, your methods will be called instead.

Method declarations


 
Private Sub IwodSSHNotify_Banner(ByVal Owner As WODSSHCOMLib.IwodSSHCom, Text As String)
 
End Sub
 
Private Sub IwodSSHNotify_Connected(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal ErrorCode As Integer, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodSSHNotify_Disconnected(ByVal Owner As WODSSHCOMLib.IwodSSHCom)
 
End Sub
 
Private Sub IwodSSHNotify_Received(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal ByteCount As Integer)
 
End Sub
 
Private Sub IwodSSHNotify_StateChange(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal OldState As WODSSHCOMLib.StatesEnum)
 
End Sub
 
Private Sub IwodSSHNotify_CryptoInformation(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal Protocol As String, ByVal RemoteName As String, ByVal SCcipher As
 
End Sub
 
Private Sub IwodSSHNotify_HostFingerprint(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal Fingerprint As String, Accept As Boolean)
 
End Sub
 
Private Sub IwodSSHNotify_LoginChallenge(ByVal Owner As WODSSHCOMLib.IwodSSHCom, ByVal Challenge As String, Response As String)
 
End Sub
 
Private Sub IwodSSHNotify_PromptReceived(ByVal Owner As WODSSHCOMLib.IwodSSHCom)
 
End Sub
 


Platforms

Windows