aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/UDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 54ec480..002e664 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -68,7 +68,7 @@ namespace OpenSim
68 protected IWorld m_localWorld; 68 protected IWorld m_localWorld;
69 protected AssetCache m_assetCache; 69 protected AssetCache m_assetCache;
70 protected InventoryCache m_inventoryCache; 70 protected InventoryCache m_inventoryCache;
71 protected ConsoleBase m_console; 71 protected LogBase m_log;
72 protected AuthenticateSessionsBase m_authenticateSessionsClass; 72 protected AuthenticateSessionsBase m_authenticateSessionsClass;
73 73
74 public PacketServer PacketServer 74 public PacketServer PacketServer
@@ -96,12 +96,12 @@ namespace OpenSim
96 { 96 {
97 } 97 }
98 98
99 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, ConsoleBase console, AuthenticateSessionsBase authenticateClass) 99 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, LogBase console, AuthenticateSessionsBase authenticateClass)
100 { 100 {
101 listenPort = port; 101 listenPort = port;
102 this.m_assetCache = assetCache; 102 this.m_assetCache = assetCache;
103 this.m_inventoryCache = inventoryCache; 103 this.m_inventoryCache = inventoryCache;
104 this.m_console = console; 104 this.m_log = console;
105 this.m_authenticateSessionsClass = authenticateClass; 105 this.m_authenticateSessionsClass = authenticateClass;
106 this.CreatePacketServer(); 106 this.CreatePacketServer();
107 107
@@ -135,7 +135,7 @@ namespace OpenSim
135 } 135 }
136 else 136 else
137 { // invalid client 137 { // invalid client
138 Console.Error.WriteLine("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); 138 m_log.Warn("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
139 } 139 }
140 140
141 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 141 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
@@ -151,20 +151,20 @@ namespace OpenSim
151 151
152 public void ServerListener() 152 public void ServerListener()
153 { 153 {
154 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 154 m_log.Status("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
155 155
156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 156 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 157 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
158 Server.Bind(ServerIncoming); 158 Server.Bind(ServerIncoming);
159 159
160 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 160 m_log.Verbose("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
161 161
162 ipeSender = new IPEndPoint(IPAddress.Any, 0); 162 ipeSender = new IPEndPoint(IPAddress.Any, 0);
163 epSender = (EndPoint)ipeSender; 163 epSender = (EndPoint)ipeSender;
164 ReceivedData = new AsyncCallback(this.OnReceivedData); 164 ReceivedData = new AsyncCallback(this.OnReceivedData);
165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 165 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
166 166
167 m_console.WriteLine(LogPriority.LOW, "UDPServer.cs:ServerListener() - Listening..."); 167 m_log.Verbose("UDPServer.cs:ServerListener() - Listening...");
168 168
169 } 169 }
170 170