/// <summary>
        /// We're going to limit requests for the same missing texture.
        /// XXX This is really a temporary solution to deal with the situation where a client continually requests
        /// the same missing textures
        /// </summary>
//        private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
//            = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);

        public UserTextureDownloadService(
            IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue <ITextureSender> sharedQueue)
        {
//            m_client = client;
            m_scene = scene;
//            m_sharedSendersQueue = sharedQueue;
        }
예제 #2
0
        public LLPacketQueue(UUID agentId, ClientStackUserSettings userSettings)
        {
            // While working on this, the BlockingQueue had me fooled for a bit.
            // The Blocking queue causes the thread to stop until there's something
            // in it to process.  it's an on-purpose threadlock though because
            // without it, the clientloop will suck up all sim resources.

            SendQueue = new OpenSim.Framework.BlockingQueue <LLQueItem>();

            IncomingPacketQueue        = new Queue <LLQueItem>();
            OutgoingPacketQueue        = new Queue <LLQueItem>();
            ResendOutgoingPacketQueue  = new Queue <LLQueItem>();
            LandOutgoingPacketQueue    = new Queue <LLQueItem>();
            WindOutgoingPacketQueue    = new Queue <LLQueItem>();
            CloudOutgoingPacketQueue   = new Queue <LLQueItem>();
            TaskOutgoingPacketQueue    = new Queue <LLQueItem>();
            TaskLowpriorityPacketQueue = new Queue <LLQueItem>();
            TextureOutgoingPacketQueue = new Queue <LLQueItem>();
            AssetOutgoingPacketQueue   = new Queue <LLQueItem>();

            // Store the throttle multiplier for posterity.
            throttleMultiplier = userSettings.ClientThrottleMultipler;

            // Set up the throttle classes (min, max, current) in bits per second
            ResendThrottle  = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler);
            LandThrottle    = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler);
            WindThrottle    = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
            CloudThrottle   = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
            TaskThrottle    = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler);
            AssetThrottle   = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler);
            TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler);

            // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
            ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;

            if (null == totalThrottleSettings)
            {
                totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000);
            }

            TotalThrottle
                = new LLPacketThrottle(
                      totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current,
                      userSettings.ClientThrottleMultipler);

            throttleTimer          = new Timer((int)(throttletimems / throttleTimeDivisor));
            throttleTimer.Elapsed += ThrottleTimerElapsed;
            throttleTimer.Start();

            // TIMERS needed for this
            // LastThrottle = DateTime.Now.Ticks;
            // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor);

            m_agentId = agentId;

            if (StatsManager.SimExtraStats != null)
            {
                StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this);
            }
        }
예제 #3
0
 public UserTextureDownloadService(
     IClientAPI client, Scene scene, OpenSim.Framework.BlockingQueue<ITextureSender> sharedQueue)
 {
     m_client = client;
     m_scene = scene;
     m_sharedSendersQueue = sharedQueue;
 }
예제 #4
0
        public LLPacketQueue(UUID agentId, ClientStackUserSettings userSettings)
        {
            // While working on this, the BlockingQueue had me fooled for a bit.
            // The Blocking queue causes the thread to stop until there's something
            // in it to process.  it's an on-purpose threadlock though because
            // without it, the clientloop will suck up all sim resources.

            SendQueue = new OpenSim.Framework.BlockingQueue<LLQueItem>();

            IncomingPacketQueue = new Queue<LLQueItem>();
            OutgoingPacketQueue = new Queue<LLQueItem>();
            ResendOutgoingPacketQueue = new Queue<LLQueItem>();
            LandOutgoingPacketQueue = new Queue<LLQueItem>();
            WindOutgoingPacketQueue = new Queue<LLQueItem>();
            CloudOutgoingPacketQueue = new Queue<LLQueItem>();
            TaskOutgoingPacketQueue = new Queue<LLQueItem>();
            TaskLowpriorityPacketQueue = new Queue<LLQueItem>();
            TextureOutgoingPacketQueue = new Queue<LLQueItem>();
            AssetOutgoingPacketQueue = new Queue<LLQueItem>();

            // Store the throttle multiplier for posterity.
            throttleMultiplier = userSettings.ClientThrottleMultipler;

            // Set up the throttle classes (min, max, current) in bits per second
            ResendThrottle =    new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler);
            LandThrottle =      new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler);
            WindThrottle =      new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
            CloudThrottle =     new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
            TaskThrottle =      new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler);
            AssetThrottle =     new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler);
            TextureThrottle =   new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler);
            
            // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.            
            ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
            if (null == totalThrottleSettings)
            {                
                totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000);
            }
            
            TotalThrottle 
                = new LLPacketThrottle(
                    totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current,
                    userSettings.ClientThrottleMultipler);

            throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor));
            throttleTimer.Elapsed += ThrottleTimerElapsed;
            throttleTimer.Start();

            // TIMERS needed for this
            // LastThrottle = DateTime.Now.Ticks;
            // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor);

            m_agentId = agentId;

            if (StatsManager.SimExtraStats != null)
            {
                StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this);
            }
        }