diff options
author | Justin Clarke Casey | 2008-10-17 17:57:18 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-17 17:57:18 +0000 |
commit | 7891f821e213639a0f15f2978ee68188f93a12f6 (patch) | |
tree | 0154d40469c97f86dd410124c82f33d292331848 /OpenSim/Framework/ProxyCodec.cs | |
parent | * reverse part of a change that accidentally crept in with the last revision (diff) | |
download | opensim-SC-7891f821e213639a0f15f2978ee68188f93a12f6.zip opensim-SC-7891f821e213639a0f15f2978ee68188f93a12f6.tar.gz opensim-SC-7891f821e213639a0f15f2978ee68188f93a12f6.tar.bz2 opensim-SC-7891f821e213639a0f15f2978ee68188f93a12f6.tar.xz |
* Instead of creating a new IPEndPoint on every udp packet receive, reuse the existing one
* This requires copying details into a new endpoint when it needs to be stored in client/circuit code hashes
Diffstat (limited to 'OpenSim/Framework/ProxyCodec.cs')
-rw-r--r-- | OpenSim/Framework/ProxyCodec.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Framework/ProxyCodec.cs b/OpenSim/Framework/ProxyCodec.cs index 9121bed..e1aeeda 100644 --- a/OpenSim/Framework/ProxyCodec.cs +++ b/OpenSim/Framework/ProxyCodec.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Framework | |||
58 | numBytes = x; | 58 | numBytes = x; |
59 | } | 59 | } |
60 | 60 | ||
61 | public static EndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes) | 61 | public static IPEndPoint DecodeProxyMessage(byte[] bytes, ref int numBytes) |
62 | { | 62 | { |
63 | // IPv4 Only | 63 | // IPv4 Only |
64 | byte[] addr = new byte[4]; | 64 | byte[] addr = new byte[4]; |
@@ -71,7 +71,7 @@ namespace OpenSim.Framework | |||
71 | ushort port = (ushort) (bytes[--numBytes] * 256); | 71 | ushort port = (ushort) (bytes[--numBytes] * 256); |
72 | port += (ushort) bytes[--numBytes]; | 72 | port += (ushort) bytes[--numBytes]; |
73 | 73 | ||
74 | return (EndPoint) new IPEndPoint(new IPAddress(addr), (int) port); | 74 | return new IPEndPoint(new IPAddress(addr), (int) port); |
75 | } | 75 | } |
76 | } | 76 | } |
77 | } | 77 | } |