ok i said all ( lie )

0.9.1.0-post-fixes
UbitUmarov 2019-01-25 21:40:30 +00:00
parent f7926eb28c
commit 07946e040d
1 changed files with 19 additions and 7 deletions

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using System.Text;
using System.Net; using System.Net;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Packets; using OpenMetaverse.Packets;
@ -40,7 +41,7 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
private EventQueueHelper() {} // no construction possible, it's an utility class private EventQueueHelper() {} // no construction possible, it's an utility class
private static byte[] ulongToByteArray(ulong uLongValue) public static byte[] ulongToByteArray(ulong uLongValue)
{ {
// Reverse endianness of RegionHandle // Reverse endianness of RegionHandle
return new byte[8] return new byte[8]
@ -56,12 +57,23 @@ namespace OpenSim.Region.ClientStack.Linden
}; };
} }
// private static byte[] uintToByteArray(uint uIntValue) public static StringBuilder StartEvent(string eventName)
// { {
// byte[] result = new byte[4]; StringBuilder sb = new StringBuilder(256);
// Utils.UIntToBytesBig(uIntValue, result, 0); LLSDxmlEncode.AddMap(sb);
// return result; LLSDxmlEncode.AddElem("message", eventName, sb);
// } LLSDxmlEncode.AddMap("body", sb);
return sb;
}
public static string EndEvent(StringBuilder sb)
{
LLSDxmlEncode.AddEndMap(sb); // close body
LLSDxmlEncode.AddEndMap(sb); // close event
return sb.ToString();
}
public static OSD BuildEvent(string eventName, OSD eventBody) public static OSD BuildEvent(string eventName, OSD eventBody)
{ {