aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs11
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs8
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a868e3a..cedb9b4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
81 uint port = (uint)scene.RegionInfo.InternalEndPoint.Port; 81 uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
82 82
83 IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address; 83 IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
84 Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler); 84 Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, m_Config, scene.AuthenticateHandler);
85 scene.RegionInfo.InternalEndPoint.Port = (int)port; 85 scene.RegionInfo.InternalEndPoint.Port = (int)port;
86 86
87 AddScene(scene); 87 AddScene(scene);
@@ -98,9 +98,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
98 } 98 }
99 #endregion 99 #endregion
100 100
101 public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) 101 public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
102 { 102 {
103 m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager); 103 m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager);
104 } 104 }
105 105
106 public virtual void AddScene(IScene scene) 106 public virtual void AddScene(IScene scene)
@@ -430,12 +430,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
430 public JobEngine OqrEngine { get; protected set; } 430 public JobEngine OqrEngine { get; protected set; }
431 431
432 public LLUDPServer( 432 public LLUDPServer(
433 IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, 433 IPAddress listenIP, ref uint port, int proxyPortOffsetParm,
434 IConfigSource configSource, AgentCircuitManager circuitManager) 434 IConfigSource configSource, AgentCircuitManager circuitManager)
435 : base(listenIP, (int)port) 435 : base(listenIP, (int)port)
436 { 436 {
437 #region Environment.TickCount Measurement 437 #region Environment.TickCount Measurement
438 438
439 // Update the port with the one we actually got
440 port = (uint)Port;
441
439 // Measure the resolution of Environment.TickCount 442 // Measure the resolution of Environment.TickCount
440 TickCountResolution = 0f; 443 TickCountResolution = 0f;
441 for (int i = 0; i < 10; i++) 444 for (int i = 0; i < 10; i++)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index fffd02c..831381e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -107,6 +107,11 @@ namespace OpenMetaverse
107 /// </summary> 107 /// </summary>
108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; } 108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
109 109
110 public int Port
111 {
112 get { return m_udpPort; }
113 }
114
110 #region PacketDropDebugging 115 #region PacketDropDebugging
111 /// <summary> 116 /// <summary>
112 /// For debugging purposes only... random number generator for dropping 117 /// For debugging purposes only... random number generator for dropping
@@ -257,6 +262,9 @@ namespace OpenMetaverse
257 262
258 m_udpSocket.Bind(ipep); 263 m_udpSocket.Bind(ipep);
259 264
265 if (m_udpPort == 0)
266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
267
260 IsRunningInbound = true; 268 IsRunningInbound = true;
261 269
262 // kick off an async receive. The Start() method will return, the 270 // kick off an async receive. The Start() method will return, the