aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/UDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/UDPServer.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index f0d3367..ae62607 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -61,7 +61,7 @@ namespace OpenSim.RegionServer
61 public class UDPServer : OpenSimNetworkHandler 61 public class UDPServer : OpenSimNetworkHandler
62 { 62 {
63 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); 63 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
64 public Socket Server; 64 private Socket Server;
65 protected IPEndPoint ServerIncoming; 65 protected IPEndPoint ServerIncoming;
66 protected byte[] RecvBuffer = new byte[4096]; 66 protected byte[] RecvBuffer = new byte[4096];
67 protected byte[] ZeroBuffer = new byte[8192]; 67 protected byte[] ZeroBuffer = new byte[8192];
@@ -201,6 +201,13 @@ namespace OpenSim.RegionServer
201 201
202 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 202 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
203 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 203 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
204
205 /// Add this new socket to the list of sockets that was opened by the application. When the application
206 /// closes, either gracefully or not, all sockets can be cleaned up. Right now I am not aware of any method
207 /// to get all of the sockets for a process within .NET, but if so, this process can be refactored, as
208 /// socket registration would not be neccessary.
209 SocketRegistry.Register(Server);
210
204 Server.Bind(ServerIncoming); 211 Server.Bind(ServerIncoming);
205 212
206 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 213 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
@@ -255,4 +262,4 @@ namespace OpenSim.RegionServer
255 return this.AuthenticateHandler(sessionID, agentID, circuitCode); 262 return this.AuthenticateHandler(sessionID, agentID, circuitCode);
256 } 263 }
257 } 264 }
258} \ No newline at end of file 265}