Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • When a web browser connects to a WinGate proxy service
  • When the Kaspersky AV scanner detects a virus
  • When a WinGate SMTP service receives an email
  • When client software connects via NAT

 

As a developer you can add your own events which can then be used by other components in the system such as Policy and the Scheduler.

  • When WinGate starts up or shuts down

 

Adding event support to your component typically requires:

  1. Registering a class (template) for your event source with EventRegisterSourceClass. This class describes the events and parameters to those events that instantiations of the event source will contain. You can then instantiate an event source based on this template without having to respecify all of the events and parameters again. For example: The WWW Proxy Service in WinGate registers a source class that describes the events a proxy service can signal. Because you can have multiple proxy services (event sources), each with the exact same events and event parameter types, all that is needed is to register the event source class once, and then instantiate a new event source when the user creates new WWW Proxy Service.
  2. Add events to the class with EventRegisterEvent
  3. Add datum (parameters) to the events of the class with EventRegisterEventDatum
  4. Optionally place event into a realm with EventAssociateRealm
  5. Instantiate the source with EventRegisterEventSource

 

Note

Event processing is a serialised operation. When an event occurs, the event handlers for that event are processed one after the other with each handler able to cancel event handling when they process the event.