* Added maintenance patch (issue #139) from BigfootAg to /trunk

This commit is contained in:
Adam Frisby
2007-06-14 14:36:40 +00:00
parent c8db62e0e4
commit 16b43b8bff
16 changed files with 215 additions and 114 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenSim.RegionServer
public class UDPServer : OpenSimNetworkHandler
{
protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
public Socket Server;
private Socket Server;
protected IPEndPoint ServerIncoming;
protected byte[] RecvBuffer = new byte[4096];
protected byte[] ZeroBuffer = new byte[8192];
@@ -201,6 +201,13 @@ namespace OpenSim.RegionServer
ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
/// Add this new socket to the list of sockets that was opened by the application. When the application
/// closes, either gracefully or not, all sockets can be cleaned up. Right now I am not aware of any method
/// to get all of the sockets for a process within .NET, but if so, this process can be refactored, as
/// socket registration would not be neccessary.
SocketRegistry.Register(Server);
Server.Bind(ServerIncoming);
m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
@@ -255,4 +262,4 @@ namespace OpenSim.RegionServer
return this.AuthenticateHandler(sessionID, agentID, circuitCode);
}
}
}
}