Search code examples
ibm-mobilefirstworklight-studioworklight-runtime

Worklight 6 - What is the purgeEventTransmissionBuffer()


I want to know the purpose of using purgeEventTransmissionBuffer() Client API in Worklight 6.

The Worklight 6 API states:

 purgeEventTransmissionBuffer()
Purges the internal event transmission buffer.

The internal event transmission buffer is purged, and all events awaiting transmission are permanently lost. 

This is not very much clear.

An example or code snap will be highly appreciated.


Solution

  • The purgeEventTransmissionBuffer API method is part of the API set belonging to the Location Services feature (also in the user documentation) introduced in Worklight 6.1.

    You can create an event by either using a trigger or by calling WL.Client.transmitEvent. So the API method above clears any pending events.