Back to product page

Fast notifications interface


Basic information

As you might have read so far, wodHttpDLXCom can use fast notification interface instead of firing events. This means that each time wodHttpDLX 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.

wodHttpDLX ActiveX DOES NOT support notifications - only wodHttpDLXCom component does!

You must declare ALL notification methods if you want to implement IwodHttpNotify, no matter if you need them or not. For example, many users don't need HostCertificate 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 IwodHttpNotify 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 IwodHttpDLXNotify

1. Add Reference to wodHttpDLXCom COM Object to your application

2. Instead of declaring wodHttpDLX like this:
 
Dim WithEvents Http1 as wodHttpDLXCom
 

you should do this:
 
Dim Http1 as wodHttpDLXCom
Implements IwodHttpNotify
 

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

4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodHttpDLXNotify' 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 IwodHttpNotify_ClientCertRequired(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom)
 
End Sub
 
Private Sub IwodHttpNotify_Connected(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom)
 
End Sub
 
Private Sub IwodHttpNotify_Disconnected(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodHttpNotify_Done(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 
Private Sub IwodHttpNotify_HeadersDone(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom)
 
End Sub
 
Private Sub IwodHttpNotify_HostCertificate(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, ByVal Cert As wodHttpDLXComLib.ICertificate, ByVal ErrorCode As Long, ByVal ErrorText As String, Accept As Boolean)
 
End Sub
 
Private Sub IwodHttpNotify_Progress(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, ByVal Position As Long, ByVal Total As Long)
 
End Sub
 
Private Sub IwodHttpNotify_Redirect(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, URL As String, Allow As Boolean)
 
End Sub
 
Private Sub IwodHttpNotify_StateChange(ByVal Owner As wodHttpDLXComLib.IwodHttpDLXCom, ByVal OldState As wodHttpDLXComLib.HttpStates)
 
End Sub
 


Platforms

Windows