aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/3Di/LoadBalancer/TcpServer.cs
diff options
context:
space:
mode:
authorJohan Berntsson2008-03-11 04:40:39 +0000
committerJohan Berntsson2008-03-11 04:40:39 +0000
commitf0bfb879798e87296e13063203d5b18a1aa1097f (patch)
tree675b3442cf477d8ed242cb23c97bd610e98d0492 /ThirdParty/3Di/LoadBalancer/TcpServer.cs
parentThe plugin loader can now handle plugin dependencies without hardcoding (diff)
downloadopensim-SC-f0bfb879798e87296e13063203d5b18a1aa1097f.zip
opensim-SC-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.gz
opensim-SC-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.bz2
opensim-SC-f0bfb879798e87296e13063203d5b18a1aa1097f.tar.xz
Eliminated several compiler warning messages
Diffstat (limited to '')
-rw-r--r--ThirdParty/3Di/LoadBalancer/TcpServer.cs18
1 files changed, 0 insertions, 18 deletions
diff --git a/ThirdParty/3Di/LoadBalancer/TcpServer.cs b/ThirdParty/3Di/LoadBalancer/TcpServer.cs
index 2d46294..216db3b 100644
--- a/ThirdParty/3Di/LoadBalancer/TcpServer.cs
+++ b/ThirdParty/3Di/LoadBalancer/TcpServer.cs
@@ -89,7 +89,6 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer {
89 } 89 }
90 90
91 public static void ReadCallback(IAsyncResult ar) { 91 public static void ReadCallback(IAsyncResult ar) {
92 String content = String.Empty;
93 StateObject state = (StateObject) ar.AsyncState; 92 StateObject state = (StateObject) ar.AsyncState;
94 Socket handler = state.workSocket; 93 Socket handler = state.workSocket;
95 94
@@ -183,23 +182,6 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer {
183 182
184 handler.BeginReceive( state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state); 183 handler.BeginReceive( state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state);
185 } 184 }
186
187 private static void Send(Socket handler, String data) {
188 byte[] byteData = Encoding.ASCII.GetBytes(data);
189 handler.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), handler);
190 }
191
192 private static void SendCallback(IAsyncResult ar) {
193 try {
194 Socket handler = (Socket) ar.AsyncState;
195 int bytesSent = handler.EndSend(ar);
196 //Console.WriteLine("Sent {0} bytes to client.", bytesSent);
197 handler.Shutdown(SocketShutdown.Both);
198 handler.Close();
199 } catch (Exception e) {
200 Console.WriteLine(e.ToString());
201 }
202 }
203 } 185 }
204 186
205 public class TcpServer { 187 public class TcpServer {