aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/3Di/LoadBalancer/TcpServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ThirdParty/3Di/LoadBalancer/TcpServer.cs')
-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 {