aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/3Di/LoadBalancer/TcpClient.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ThirdParty/3Di/LoadBalancer/TcpClient.cs32
1 files changed, 0 insertions, 32 deletions
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
80 } 80 }
81 } 81 }
82 82
83/*
84 public static void Receive(Socket client) {
85 try {
86 StateObject state = new StateObject();
87 state.workSocket = client;
88 client.BeginReceive( state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReceiveCallback), state);
89 } catch (Exception e) {
90 Console.WriteLine(e.ToString());
91 }
92 }
93
94 private static void ReceiveCallback( IAsyncResult ar ) {
95 try {
96 StateObject state = (StateObject) ar.AsyncState;
97 Socket client = state.workSocket;
98
99 int bytesRead = client.EndReceive(ar);
100 if (bytesRead > 0) {
101 state.sb.Append(Encoding.ASCII.GetString(state.buffer,0,bytesRead));
102 client.BeginReceive(state.buffer,0,StateObject.BufferSize,0, new AsyncCallback(ReceiveCallback), state);
103 } else {
104 if (state.sb.Length > 1) {
105 response = state.sb.ToString();
106 }
107 receiveDone.Set();
108 }
109 } catch (Exception e) {
110 Console.WriteLine(e.ToString());
111 }
112 }
113*/
114
115 public static void Send(Socket client, byte[] byteData) 83 public static void Send(Socket client, byte[] byteData)
116 { 84 {
117 client.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), client); 85 client.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), client);