Back to product page

Notification property


Fast notification interface to use instead of events.

Type

IwodWebNotify object

Syntax

  • Basic
[Set] object.Notification [= value]
The Notification(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodWebServer
valueIwodWebNotify object

Remarks

NOTE: This property is available only in COM/DLL version of wodWebServerCom.

Notification property holds reference to IwodWebNotify interface that can be implemented by your application. When this property is set, and contains such a reference, wodWebServer will call your method implementations instead of firing events. More information on how this works can be found here.

For example, instead of having this in your code (VB example):
 
Private Sub Web1_UserConnected(ByVal User As WODWEBSERVERCOMLib.IWebUser, Action As WODWEBSERVERCOMLib.WebActions)
 
End Sub
 

you will have this:
 
Private Sub IwodWebNotify_UserConnected(ByVal Owner As WODWEBSERVERCOMLib.IwodWebServerCom, ByVal User As WODWEBSERVERCOMLib.IWebUser, Action As WODWEBSERVERCOMLib.WebActions)
 
End Sub
 

pretty much the same - except notification method has one more argument - Owner, which holds reference to wodWebServer instance that called this method.

In VB, to implement IwodWebNotify interface, you need code like this:
- at the top of the code, in section, put this:
 
Dim Web1 As wodWebServerCom
Implements IwodWebNotify
 

- in Form_Load (or where you initialize new instance of wodWebServer) do this:
 
Set Web1 = New wodWebServerCom
Set Web1.Notification = Me
Web1.Start
'...

You can notice that when we declared wodWebServer, we did not use WithEvents keyword - it is not needed anymore, because events will not be fired anymore. Notification methods we implement will be called instead!

Platforms

Windows