aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetCache.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-18 15:54:05 +0000
committerTeravus Ovares2007-11-18 15:54:05 +0000
commit615b40b68b2311433b855f8c1e961a8b71eb9b65 (patch)
treece9620d6f9e59e5e841f9746d738f6a71063eae4 /OpenSim/Framework/Communications/Cache/AssetCache.cs
parentcleaned up some mono compiler warnings (diff)
downloadopensim-SC-615b40b68b2311433b855f8c1e961a8b71eb9b65.zip
opensim-SC-615b40b68b2311433b855f8c1e961a8b71eb9b65.tar.gz
opensim-SC-615b40b68b2311433b855f8c1e961a8b71eb9b65.tar.bz2
opensim-SC-615b40b68b2311433b855f8c1e961a8b71eb9b65.tar.xz
* Refactored IClientAPI.OutPacket to require a second mandatory parameter. This parameter has an enum:int ThrottleOutPacketType and contains types; Resend, Land, Wind, Cloud, Task, Texture, and Asset.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 99041c1..edca142 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -520,7 +520,7 @@ namespace OpenSim.Framework.Communications.Cache
520 } 520 }
521 Transfer.TransferInfo.Size = (int) req.AssetInf.Data.Length; 521 Transfer.TransferInfo.Size = (int) req.AssetInf.Data.Length;
522 Transfer.TransferInfo.TransferID = req.TransferRequestID; 522 Transfer.TransferInfo.TransferID = req.TransferRequestID;
523 req.RequestUser.OutPacket(Transfer); 523 req.RequestUser.OutPacket(Transfer,ThrottleOutPacketType.Asset);
524 524
525 if (req.NumPackets == 1) 525 if (req.NumPackets == 1)
526 { 526 {
@@ -530,7 +530,7 @@ namespace OpenSim.Framework.Communications.Cache
530 TransferPacket.TransferData.TransferID = req.TransferRequestID; 530 TransferPacket.TransferData.TransferID = req.TransferRequestID;
531 TransferPacket.TransferData.Data = req.AssetInf.Data; 531 TransferPacket.TransferData.Data = req.AssetInf.Data;
532 TransferPacket.TransferData.Status = 1; 532 TransferPacket.TransferData.Status = 1;
533 req.RequestUser.OutPacket(TransferPacket); 533 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
534 } 534 }
535 else 535 else
536 { 536 {
@@ -546,7 +546,7 @@ namespace OpenSim.Framework.Communications.Cache
546 Array.Copy(req.AssetInf.Data, chunk, req.AssetInf.Data.Length); 546 Array.Copy(req.AssetInf.Data, chunk, req.AssetInf.Data.Length);
547 TransferPacket.TransferData.Data = chunk; 547 TransferPacket.TransferData.Data = chunk;
548 TransferPacket.TransferData.Status = 1; 548 TransferPacket.TransferData.Status = 1;
549 req.RequestUser.OutPacket(TransferPacket); 549 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
550 } 550 }
551 else 551 else
552 { 552 {
@@ -555,7 +555,7 @@ namespace OpenSim.Framework.Communications.Cache
555 555
556 TransferPacket.TransferData.Data = chunk; 556 TransferPacket.TransferData.Data = chunk;
557 TransferPacket.TransferData.Status = 0; 557 TransferPacket.TransferData.Status = 0;
558 req.RequestUser.OutPacket(TransferPacket); 558 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
559 559
560 TransferPacket = new TransferPacketPacket(); 560 TransferPacket = new TransferPacketPacket();
561 TransferPacket.TransferData.Packet = 1; 561 TransferPacket.TransferData.Packet = 1;
@@ -565,7 +565,7 @@ namespace OpenSim.Framework.Communications.Cache
565 Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length); 565 Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length);
566 TransferPacket.TransferData.Data = chunk1; 566 TransferPacket.TransferData.Data = chunk1;
567 TransferPacket.TransferData.Status = 1; 567 TransferPacket.TransferData.Status = 1;
568 req.RequestUser.OutPacket(TransferPacket); 568 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
569 } 569 }
570 } 570 }
571 } 571 }
@@ -741,7 +741,7 @@ namespace OpenSim.Framework.Communications.Cache
741 im.ImageID.Size = (uint) req.ImageInfo.Data.Length; 741 im.ImageID.Size = (uint) req.ImageInfo.Data.Length;
742 im.ImageData.Data = req.ImageInfo.Data; 742 im.ImageData.Data = req.ImageInfo.Data;
743 im.ImageID.Codec = 2; 743 im.ImageID.Codec = 2;
744 req.RequestUser.OutPacket(im); 744 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
745 req.PacketCounter++; 745 req.PacketCounter++;
746 //req.ImageInfo.l= time; 746 //req.ImageInfo.l= time;
747 //System.Console.WriteLine("sent texture: " + req.ImageInfo.FullID); 747 //System.Console.WriteLine("sent texture: " + req.ImageInfo.FullID);
@@ -758,7 +758,7 @@ namespace OpenSim.Framework.Communications.Cache
758 im.ImageData.Data = new byte[600]; 758 im.ImageData.Data = new byte[600];
759 Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600); 759 Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600);
760 im.ImageID.Codec = 2; 760 im.ImageID.Codec = 2;
761 req.RequestUser.OutPacket(im); 761 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
762 762
763 req.PacketCounter++; 763 req.PacketCounter++;
764 //req.ImageInfo.last_used = time; 764 //req.ImageInfo.last_used = time;
@@ -780,7 +780,7 @@ namespace OpenSim.Framework.Communications.Cache
780 //Console.WriteLine("length= {0} counter= {1} size= {2}",req.ImageInfo.Data.Length, req.PacketCounter, size); 780 //Console.WriteLine("length= {0} counter= {1} size= {2}",req.ImageInfo.Data.Length, req.PacketCounter, size);
781 im.ImageData.Data = new byte[size]; 781 im.ImageData.Data = new byte[size];
782 Array.Copy(req.ImageInfo.Data, 600 + (1000*(req.PacketCounter - 1)), im.ImageData.Data, 0, size); 782 Array.Copy(req.ImageInfo.Data, 600 + (1000*(req.PacketCounter - 1)), im.ImageData.Data, 0, size);
783 req.RequestUser.OutPacket(im); 783 req.RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
784 req.PacketCounter++; 784 req.PacketCounter++;
785 //req.ImageInfo.last_used = time; 785 //req.ImageInfo.last_used = time;
786 //System.Console.WriteLine("sent a packet of texture: "+req.ImageInfo.FullID); 786 //System.Console.WriteLine("sent a packet of texture: "+req.ImageInfo.FullID);