change encoding of a another event cap message

This commit is contained in:
UbitUmarov
2019-01-28 00:40:33 +00:00
parent 695d807696
commit cc204a279e
2 changed files with 80 additions and 177 deletions

View File

@@ -48,6 +48,8 @@ namespace OpenSim.Framework
sb.Append("<llsd>");
}
public const string LLSDEmpty = "<llsd><map /></llsd>";
// got tired of creating a stringbuilder all the time;
public static StringBuilder Start(int size = 256, bool addxmlversion = false)
{
@@ -97,6 +99,11 @@ namespace OpenSim.Framework
sb.Append("</array>");
}
public static void AddEndMapAndArray(StringBuilder sb)
{
sb.Append("</map></array>");
}
public static void AddEmptyArray(StringBuilder sb)
{
sb.Append("<array />");
@@ -386,6 +393,13 @@ namespace OpenSim.Framework
sb.Append("</key><array>");
}
public static void AddArrayAndMap(string name, StringBuilder sb)
{
sb.Append("<key>");
sb.Append(name);
sb.Append("</key><array><map>");
}
public static void AddEmptyArray(string name, StringBuilder sb)
{
sb.Append("<key>");
@@ -706,7 +720,7 @@ namespace OpenSim.Framework
public static void AddLLSD(string e, StringBuilder sb)
{
sb.Append(e);
sb.Append(e);
}
public static void EscapeToXML(string s, StringBuilder sb)
@@ -746,14 +760,14 @@ namespace OpenSim.Framework
{
return new byte[8]
{
(byte)((uLongValue >> 56) & 0xff),
(byte)((uLongValue >> 48) & 0xff),
(byte)((uLongValue >> 40) & 0xff),
(byte)((uLongValue >> 32) & 0xff),
(byte)((uLongValue >> 24) & 0xff),
(byte)((uLongValue >> 16) & 0xff),
(byte)((uLongValue >> 8) & 0xff),
(byte)(uLongValue & 0xff)
(byte)(uLongValue >> 56),
(byte)(uLongValue >> 48),
(byte)(uLongValue >> 40),
(byte)(uLongValue >> 32),
(byte)(uLongValue >> 24),
(byte)(uLongValue >> 16),
(byte)(uLongValue >> 8),
(byte)uLongValue
};
}
@@ -761,10 +775,10 @@ namespace OpenSim.Framework
{
return new byte[4]
{
(byte)((value >> 24) & 0xff),
(byte)((value >> 16) & 0xff),
(byte)((value >> 8) & 0xff),
(byte)(value & 0xff)
(byte)(value >> 24),
(byte)(value >> 16),
(byte)(value >> 8),
(byte)value
};
}
}