direct post listen events on chat, bypassing intermediate storage and timed pooling. ( code still dirty)

This commit is contained in:
UbitUmarov
2022-06-21 02:18:38 +01:00
parent 86dc93ec3b
commit 16d5d7d7fc
6 changed files with 89 additions and 119 deletions

View File

@@ -70,7 +70,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// e.g. for http_request this will be an object array of key request_id, string method, string body
/// </param>
bool PostScriptEvent(UUID itemID, string name, Object[] args);
bool PostObjectEvent(UUID itemID, string name, Object[] args);
/// <summary>

View File

@@ -31,7 +31,6 @@ using OpenSim.Framework;
namespace OpenSim.Region.Framework.Interfaces
{
public interface IWorldCommListenerMessage { }
public interface IWorldCommListenerInfo
{
bool IsActive { get; }
@@ -129,18 +128,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// </param>
void DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg);
/// <summary>
/// Are there any listen events ready to be dispatched?
/// </summary>
/// <returns>boolean indication</returns>
bool HasMessages();
/// <summary>
/// Pop the first availlable listen event from the queue
/// </summary>
/// <returns>ListenerInfo with filter filled in</returns>
IWorldCommListenerMessage GetNextMessage();
void ListenControl(UUID itemID, int handle, int active);
void ListenRemove(UUID itemID, int handle);
void DeleteListener(UUID itemID);

View File

@@ -3282,25 +3282,33 @@ namespace OpenSim.Region.Framework.Scenes
OnThrottleUpdate?.Invoke(scenePresence);
}
// public void TriggerGatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids)
// {
// GatherUuids handler = OnGatherUuids;
//
// if (handler != null)
// {
// foreach (GatherUuids d in handler.GetInvocationList())
// {
// try
// {
// d(sop, assetUuids);
// }
// catch (Exception e)
// {
// m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TriggerUuidGather failed - continuing {0} - {1}",
// e.Message, e.StackTrace);
// }
// }
// }
// }
// public void TriggerGatherUuids(SceneObjectPart sop, IDictionary<UUID, AssetType> assetUuids)
// {
// GatherUuids handler = OnGatherUuids;
//
// if (handler != null)
// {
// foreach (GatherUuids d in handler.GetInvocationList())
// {
// try
// {
// d(sop, assetUuids);
// }
// catch (Exception e)
// {
// m_log.ErrorFormat("[EVENT MANAGER]: Delegate for TriggerUuidGather failed - continuing {0} - {1}",
// e.Message, e.StackTrace);
// }
// }
// }
// }
public delegate void ScriptListen(UUID scriptID, int channel, string name, UUID id, string message);
public event ScriptListen OnScriptListenEvent;
public void TriggerScriptListen(UUID scriptID, int channel, string name, UUID id, string message)
{
OnScriptListenEvent?.Invoke(scriptID, channel, name, id, message);
}
}
}