diff options
author | Adam Frisby | 2007-06-20 15:50:06 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-20 15:50:06 +0000 |
commit | 29053589bff370916f4067dade70969499f77ce3 (patch) | |
tree | 582e2c839ce2e681dc98087bb12c71241641ffc6 /OpenSim/OpenSim.RegionServer/UDPServer.cs | |
parent | * Removed ClientThreads from avatar (diff) | |
download | opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.zip opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.gz opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.bz2 opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.xz |
* Replaced old logging mechanism with new shiny logging mechanism
* Console, I bid thee farewall. Use "Log" now where console used to exist.
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/UDPServer.cs')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/UDPServer.cs | 14 |
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 | ||