diff options
author | Jeff Ames | 2008-02-26 15:36:17 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-26 15:36:17 +0000 |
commit | 74940c7b1dbd44dc236b6b1bf6a7d03ce8e6ea43 (patch) | |
tree | 219db5a8e80858c28ee7c2a4173ffe71fd93d382 /OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs | |
parent | * Hooked up replacment TerrainModule, raising land will now be weird as both ... (diff) | |
download | opensim-SC-74940c7b1dbd44dc236b6b1bf6a7d03ce8e6ea43.zip opensim-SC-74940c7b1dbd44dc236b6b1bf6a7d03ce8e6ea43.tar.gz opensim-SC-74940c7b1dbd44dc236b6b1bf6a7d03ce8e6ea43.tar.bz2 opensim-SC-74940c7b1dbd44dc236b6b1bf6a7d03ce8e6ea43.tar.xz |
Update svn properties.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs b/OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs index 2f9ec55..19b2e7b 100644 --- a/OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs +++ b/OpenSim/Region/Environment/Modules/VoiceChat/VoicePacketHeader.cs | |||
@@ -1,38 +1,38 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Region.Environment.Modules.VoiceChat | 5 | namespace OpenSim.Region.Environment.Modules.VoiceChat |
6 | { | 6 | { |
7 | public class VoicePacketHeader | 7 | public class VoicePacketHeader |
8 | { | 8 | { |
9 | public byte type; | 9 | public byte type; |
10 | public int length; | 10 | public int length; |
11 | 11 | ||
12 | public void Parse(byte[] data) | 12 | public void Parse(byte[] data) |
13 | { | 13 | { |
14 | int offset = 0; | 14 | int offset = 0; |
15 | type = data[offset++]; | 15 | type = data[offset++]; |
16 | 16 | ||
17 | length = data[offset++]; | 17 | length = data[offset++]; |
18 | length |= data[offset++] << 8; | 18 | length |= data[offset++] << 8; |
19 | length |= data[offset++] << 16; | 19 | length |= data[offset++] << 16; |
20 | length |= data[offset++] << 24; | 20 | length |= data[offset++] << 24; |
21 | } | 21 | } |
22 | 22 | ||
23 | public void CopyTo(byte[] data, int offset) | 23 | public void CopyTo(byte[] data, int offset) |
24 | { | 24 | { |
25 | data[offset + 0] = type; | 25 | data[offset + 0] = type; |
26 | 26 | ||
27 | data[offset + 1] = (byte)(length & 0x000000FF); | 27 | data[offset + 1] = (byte)(length & 0x000000FF); |
28 | data[offset + 2] = (byte)((length & 0x0000FF00) >> 8); | 28 | data[offset + 2] = (byte)((length & 0x0000FF00) >> 8); |
29 | data[offset + 3] = (byte)((length & 0x00FF0000) >> 16); | 29 | data[offset + 3] = (byte)((length & 0x00FF0000) >> 16); |
30 | data[offset + 4] = (byte)((length & 0xFF000000) >> 24); | 30 | data[offset + 4] = (byte)((length & 0xFF000000) >> 24); |
31 | } | 31 | } |
32 | 32 | ||
33 | public int GetLength() | 33 | public int GetLength() |
34 | { | 34 | { |
35 | return 5; | 35 | return 5; |
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |