Back to product page

Fast notifications interface


Basic information

As you might have read so far, wodFTPServer (only its COM/DLL version) can use fast notification interface instead of firing events. This means that each time wodFTPD 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.

wodFTPD ActiveX DOES NOT support notifications - only wodFTPDCom component does!

You must declare ALL notification methods if you want to implement IwodFTPDNotify, no matter if you need them or not. For example, many users don't need LoginCertificate 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 IwodFTPDNotify 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 IwodFTPDNotify:
  1. Add Reference to wodFTPDCom COM Object to your application
  2. Instead of declaring wodFTPD like this:
     
    Dim WithEvents FTPD1 as wodFTPDCom
     

    you should do this:
     
    Dim FTPD1 as wodFTPDCom
    Implements IwodFTPDNotify
     

  3. In Form_Load, create new instance for FTPD1, and pass reference of our IwodFTPDNotify to it
     
    Set FTPD1 = new wodFTPDCom
    Set FTPD1.Notification = Me
     

  4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodFTPDNotify' 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.
  5. All done. Now put breakpoints to your methods. You will see that instead of fired event, your methods will be called instead.


Method declarations
 
Private Sub IwodFTPDNotify_ChangeDir(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Command(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, CmdLine As String)
 
End Sub
 
Private Sub IwodFTPDNotify_Connected(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Connecting(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_CryptoInformation(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, 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 IwodFTPDNotify_DeleteFile(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Disconnected(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser)
 
End Sub
 
Private Sub IwodFTPDNotify_DownloadFile(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_FileTransferData(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, FileData() As Byte)
 
End Sub
 
Private Sub IwodFTPDNotify_ListDir(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_ListDirData(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, DirData() As Byte, ByVal NamesOnly As Boolean)
 
End Sub
 
Private Sub IwodFTPDNotify_LoginCertificate(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal ErrorText As String, ByVal Certificate As wodFTPDComLib.ICertificate, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_LoginPassword(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal Login As String, ByVal Password As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_MakeDir(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Progress(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal Position As Long, ByVal Total As Long)
 
End Sub
 
Private Sub IwodFTPDNotify_Progress64(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal PositionLo As Long, ByVal PositionHi As Long, ByVal TotalLo As Long, ByVal TotalHi As Long)
 
End Sub
 
Private Sub IwodFTPDNotify_RemoveDir(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Rename(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ByVal ResolvedPath As String, NewName As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_Response(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, RespLine As String)
 
End Sub
 
Private Sub IwodFTPDNotify_Site(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal Command As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_StateChanged(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal NewState As wodFTPDComLib.StatesEnum, ByVal OldState As wodFTPDComLib.StatesEnum)
 
End Sub
 
Private Sub IwodFTPDNotify_TransferComplete(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal Successful As Boolean)
 
End Sub
 
Private Sub IwodFTPDNotify_TransferStatus(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, Action As wodFTPDComLib.FtpActions)
 
End Sub
 
Private Sub IwodFTPDNotify_UploadFile(ByVal Owner As wodFTPDComLib.IwodFTPDCom, ByVal User As wodFTPDComLib.IFtpUser, ByVal RelativePath As String, ResolvedPath As String, Action As wodFTPDComLib.FtpActions)
 
End Sub
 


Platforms

Windows