WeOnlyDo! wodWebServer ActiveX - Fast notifications interface
 

 

Basic information

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

wodWebServer ActiveX DOES NOT support notifications - only wodWebServerCom component does!

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

1. Add Reference to wodWebServerCom COM Object to your application

2. Instead of declaring wodWebServer like this:

Dim WithEvents WebServer1 as wodWebServerCom

you should do this:

Dim WebServer1 as wodWebServerCom
Implements IwodWebNotify

3. In Form_Load, create new instance for WebServer1, and pass reference of our IwodWebNotify to it

Set WebServer1 = new wodWebServerCom
Set WebServer1.Notification = Me

4. Implement ALL methods, or at least declare their empty bodies. You can do it automatically if you locate 'IwodWebNotify' 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 IwodWebNotify_CGIStart(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal FullPath As String, ByVal Environment As WODWEBSERVERCOMLib.IWebHeaders)

End Sub

Private Sub IwodWebNotify_CGIStop(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal success As Boolean)

End Sub

Private Sub IwodWebNotify_RequestDone(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser)

End Sub

Private Sub IwodWebNotify_RequestHeaders(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser)

End Sub

Private Sub IwodWebNotify_ResponseDone(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser)

End Sub

Private Sub IwodWebNotify_RunScript(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal ScriptData As String, ResponseData As String)

End Sub

Private Sub IwodWebNotify_StateChange(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal OldState As WODWEBSERVERCOMLib.StatesEnum)

End Sub

Private Sub IwodWebNotify_UploadFilename(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal Part As WODWEBSERVERCOMLib.IWebRequestUploadPart)

End Sub

Private Sub IwodWebNotify_UserAuthenticate(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, ByVal AuthType As WODWEBSERVERCOMLib.WebAuthenticationTypes, Action As WODWEBSERVERCOMLib.WebActions)

End Sub


Private Sub IwodWebNotify_UserConnected(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, Action As WODWEBSERVERCOMLib.WebActions)

End Sub

Private Sub IwodWebNotify_UserDisconnected(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser)

End Sub