From 76d8eaa4069d6445c47784168e274ba4253f7b9c Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 18:50:44 +0000 Subject: * Thanks to Mic Bowman for inspiring me to look at that we are still using ASCIIEncoder in places we shouldn't. --- ThirdParty/3Di/LoadBalancer/TcpClient.cs | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'ThirdParty/3Di') diff --git a/ThirdParty/3Di/LoadBalancer/TcpClient.cs b/ThirdParty/3Di/LoadBalancer/TcpClient.cs index af678a0..ddd40cc 100644 --- a/ThirdParty/3Di/LoadBalancer/TcpClient.cs +++ b/ThirdParty/3Di/LoadBalancer/TcpClient.cs @@ -80,38 +80,6 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer } } -/* - public static void Receive(Socket client) { - try { - StateObject state = new StateObject(); - state.workSocket = client; - client.BeginReceive( state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReceiveCallback), state); - } catch (Exception e) { - Console.WriteLine(e.ToString()); - } - } - - private static void ReceiveCallback( IAsyncResult ar ) { - try { - StateObject state = (StateObject) ar.AsyncState; - Socket client = state.workSocket; - - int bytesRead = client.EndReceive(ar); - if (bytesRead > 0) { - state.sb.Append(Encoding.ASCII.GetString(state.buffer,0,bytesRead)); - client.BeginReceive(state.buffer,0,StateObject.BufferSize,0, new AsyncCallback(ReceiveCallback), state); - } else { - if (state.sb.Length > 1) { - response = state.sb.ToString(); - } - receiveDone.Set(); - } - } catch (Exception e) { - Console.WriteLine(e.ToString()); - } - } -*/ - public static void Send(Socket client, byte[] byteData) { client.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), client); -- cgit v1.1