Event queue
From OpenSimulator
(Created page with "=Introduction= The event queue is a Linden Lab viewer protocol mechanism whereby the simulator can place messages on a queue which is regularly TCP polled by a client/viewer....") |
(→Introduction) |
||
Line 14: | Line 14: | ||
eq.Enqueue(EventQueueHelper.BuildEvent("myevent", eventBodyOsd)); | eq.Enqueue(EventQueueHelper.BuildEvent("myevent", eventBodyOsd)); | ||
</source> | </source> | ||
+ | |||
+ | [[OpenStructuredData]] (OSD) is the name of a data format that is a superset of [http://wiki.secondlife.com/wiki/LLSD Linden Lab Structured Data (LLSD)]. It's XML which contains some information about embedded types. | ||
I believe (justincc) that the viewer polls the event queue every second, though that needs to be re-confirmed via specific testing. | I believe (justincc) that the viewer polls the event queue every second, though that needs to be re-confirmed via specific testing. |
Revision as of 10:32, 26 June 2014
Introduction
The event queue is a Linden Lab viewer protocol mechanism whereby the simulator can place messages on a queue which is regularly TCP polled by a client/viewer. In this way, a simulator can directly send data back to a viewer.
The Linden Lab wiki has a very short description of the event queue but no further detail.
In OpenSimulator, the event queue is implemented by the EventQueueGetModule in the OpenSim.Region.ClientStack.LindenCaps package. This fulfils the interface IEventQueue.
As events are distinguished by a message parameter, one could construct an arbitary for a modified client/viewer that can recognize it with the EventQueueHelper.BuildEvent() static method and then inject that data by obtaining a reference to EventQueueGetModule, for example with
IEventQueue eq = scene.RequestModuleInterface<IEventQueue>(); if (eq != null) eq.Enqueue(EventQueueHelper.BuildEvent("myevent", eventBodyOsd));
OpenStructuredData (OSD) is the name of a data format that is a superset of Linden Lab Structured Data (LLSD). It's XML which contains some information about embedded types.
I believe (justincc) that the viewer polls the event queue every second, though that needs to be re-confirmed via specific testing.