aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-06 02:38:00 -0700
committerJohn Hurliman2009-10-06 02:38:00 -0700
commite7c877407f2a72a9519eb53debca5aeef20cded9 (patch)
treeed67cb35522f357874f6e2749d66fd48493ede80 /OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim into htb-thr... (diff)
downloadopensim-SC_OLD-e7c877407f2a72a9519eb53debca5aeef20cded9.zip
opensim-SC_OLD-e7c877407f2a72a9519eb53debca5aeef20cded9.tar.gz
opensim-SC_OLD-e7c877407f2a72a9519eb53debca5aeef20cded9.tar.bz2
opensim-SC_OLD-e7c877407f2a72a9519eb53debca5aeef20cded9.tar.xz
* Continued work on the new LLUDP implementation. Appears to be functioning, although not everything is reimplemented yet
* Replaced logic in ThreadTracker with a call to System.Diagnostics that does the same thing * Added Util.StringToBytes256() and Util.StringToBytes1024() to clamp output at byte[256] and byte[1024], respectively * Fixed formatting for a MySQLAssetData error logging line
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs (renamed from OpenSim/Region/ClientStack/LindenUDP/LLUtil.cs)40
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUtil.cs b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs
index 066b19d..69b0c5f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUtil.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -26,31 +26,31 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using OpenSim.Framework;
30using System.Net;
31using OpenMetaverse; 30using OpenMetaverse;
32 31
33using ReaderWriterLockImpl = OpenMetaverse.ReaderWriterLockSlim;
34
35namespace OpenSim.Region.ClientStack.LindenUDP 32namespace OpenSim.Region.ClientStack.LindenUDP
36{ 33{
37 public class LLUtil 34 public sealed class OutgoingPacket
38 { 35 {
39 /// <summary> 36 /// <summary>Client this packet is destined for</summary>
40 /// Convert a string to bytes suitable for use in an LL UDP packet. 37 public LLUDPClient Client;
41 /// </summary> 38 /// <summary>Packet data to send</summary>
42 /// <param name="s">Truncated to 254 characters if necessary</param> 39 public UDPPacketBuffer Buffer;
43 /// <returns></returns> 40 /// <summary>Sequence number of the wrapped packet</summary>
44 public static byte[] StringToPacketBytes(string s) 41 public uint SequenceNumber;
42 /// <summary>Number of times this packet has been resent</summary>
43 public int ResendCount;
44 /// <summary>Environment.TickCount when this packet was last sent over the wire</summary>
45 public int TickCount;
46 /// <summary>Category this packet belongs to</summary>
47 public ThrottleOutPacketType Category;
48
49 public OutgoingPacket(LLUDPClient client, UDPPacketBuffer buffer, ThrottleOutPacketType category)
45 { 50 {
46 // Anything more than 254 will cause libsecondlife to barf 51 Client = client;
47 // (libsl 1550) adds an \0 on the Utils.StringToBytes conversion if it isn't present 52 Buffer = buffer;
48 if (s.Length > 254) 53 Category = category;
49 {
50 s = s.Remove(254);
51 }
52
53 return Utils.StringToBytes(s);
54 } 54 }
55 } 55 }
56} 56}