aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
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
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')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs16
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs6
2 files changed, 11 insertions, 11 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);
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
index 9e9ec05..acd57b6 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
@@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications.Cache
221 ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket(); 221 ConfirmXferPacketPacket newPack = new ConfirmXferPacketPacket();
222 newPack.XferID.ID = xferID; 222 newPack.XferID.ID = xferID;
223 newPack.XferID.Packet = packetID; 223 newPack.XferID.Packet = packetID;
224 ourClient.OutPacket(newPack); 224 ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset);
225 if ((packetID & 0x80000000) != 0) 225 if ((packetID & 0x80000000) != 0)
226 { 226 {
227 SendCompleteMessage(); 227 SendCompleteMessage();
@@ -262,7 +262,7 @@ namespace OpenSim.Framework.Communications.Cache
262 newPack.XferID.VFileID = Asset.FullID; 262 newPack.XferID.VFileID = Asset.FullID;
263 newPack.XferID.FilePath = 0; 263 newPack.XferID.FilePath = 0;
264 newPack.XferID.Filename = new byte[0]; 264 newPack.XferID.Filename = new byte[0];
265 ourClient.OutPacket(newPack); 265 ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset);
266 } 266 }
267 267
268 protected void SendCompleteMessage() 268 protected void SendCompleteMessage()
@@ -272,7 +272,7 @@ namespace OpenSim.Framework.Communications.Cache
272 newPack.AssetBlock.Type = Asset.Type; 272 newPack.AssetBlock.Type = Asset.Type;
273 newPack.AssetBlock.Success = true; 273 newPack.AssetBlock.Success = true;
274 newPack.AssetBlock.UUID = Asset.FullID; 274 newPack.AssetBlock.UUID = Asset.FullID;
275 ourClient.OutPacket(newPack); 275 ourClient.OutPacket(newPack, ThrottleOutPacketType.Asset);
276 m_finished = true; 276 m_finished = true;
277 if (m_createItem) 277 if (m_createItem)
278 { 278 {