Back to product page

Fast notifications interface


Basic information

As you might have read so far, wodSSHDCom can use fast notification interface instead of firing events. This means that each time wodSSHD needs to fire an event, it will call your implementation of the event instead. Notifications can be 30 times faster than events - meaning it is advised to be used if speed is needed in your applications.

wodSSHD ActiveX DOES NOT support notifications - only wodSSHDCom component does!

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

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

Steps needed to implement IwodSSHD-Notifications
  1. 1. Add Reference to wodSSHDCom COM Object to your application
  2. 2. Instead of declaring wodSSHD like this:

  3.  
    Dim WithEvents SSHD1 as wodSSHDCom
     

    you should do this:
     
    Dim SSHD1 as wodSSHDCom
    Implements IwodSSHD-Notifications
     

  4. 3. In Form_Load, create new instance for SSHD1, and pass reference of our IwodSSHD-Notifications to it
     
    Set SSHD1 = new wodSSHDCom
    Set SSHD1.Notification = Me
     

  5. 4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodSSHD-Notifications' object in the list of all objects existing on your form (combo box in upper left corner of your code view), or just can do it by hand.
  6. 5. All done. Now put breakpoints to your methods. You will see that instead of fired event, your methods will be called instead.
  7. Method declarations
     
    Private Sub IwodSSHD-Notifications_Connecting(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_CryptoInformation(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal Protocol As String, ByVal RemoteName As String, ByVal SCcipher As String, ByVal CScipher As String, ByVal Keys As String, Accept As Boolean)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_Disconnected(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_LoginGSSAPI(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal TokenData As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_LoginPassword(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal Password As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_LoginPubkey(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal Login As String, ByVal PublicKey As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_PortBindRequest(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, BindIP As String, BindPort As Long, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_PortForwardConnect(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RemoteHost As String, ByVal RemotePort As Long, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_PortForwardDisconnect(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RemoteHost As String, ByVal RemotePort As Long)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_PortForwardRequest(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, RemoteHost As String, RemotePort As Long, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_Received(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal BytesCount As Long)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_ServiceRequest(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ServiceType As wodSSHDComLIB.SSHServiceTypes, ServicePath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_ServiceStart(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal ServiceIndex As Long, ByVal ServiceType As wodSSHDComLIB.SSHServiceTypes, ByVal ServiceName As String)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpDeleteFile(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpDownloadFile(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpFileTransferData(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, FileData() As Byte)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpListDir(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpListDirData(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, DirData() As Byte, ByVal NamesOnly As Boolean)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpMakeDir(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHDNotify_SftpProgress(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpRemoveDir(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpRename(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, NewName As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_SftpUploadFile(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodSSHDComLIB.SSHActions)
     
    End Sub
     
    Private Sub IwodSSHD-Notifications_StateChanged(ByVal Owner As wodSSHDComLIB.IwodSSHDCom, ByVal User As wodSSHDComLIB.ISSHUser, ByVal NewState As wodSSHDComLIB.SSHStates, ByVal OldState As wodSSHDComLIB.SSHStates)
     
    End Sub
     


Platforms

Windows