2007-03-22 10:11:15 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text;
|
|
|
|
using libsecondlife;
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
|
|
namespace OpenSim.Framework.Utilities
|
|
|
|
{
|
|
|
|
public class Util
|
|
|
|
{
|
|
|
|
private static Random randomClass = new Random();
|
2007-03-26 16:51:50 +00:00
|
|
|
private static uint nextXferID = 5000;
|
2007-03-25 17:34:58 +00:00
|
|
|
private static object XferLock = new object();
|
2007-03-22 10:11:15 +00:00
|
|
|
|
|
|
|
public static ulong UIntsToLong(uint X, uint Y)
|
|
|
|
{
|
|
|
|
return Helpers.UIntsToLong(X, Y);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Random RandomClass
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return randomClass;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-25 17:34:58 +00:00
|
|
|
public static uint GetNextXferID()
|
|
|
|
{
|
|
|
|
uint id = 0;
|
|
|
|
lock(XferLock)
|
|
|
|
{
|
|
|
|
id = nextXferID;
|
|
|
|
nextXferID++;
|
|
|
|
}
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:11:15 +00:00
|
|
|
public Util()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|