예제 #1
0
        public void Resend(TurtleServer.Result callback)
        {
            lock (Program.server.commandPoolOderSo)
            {
                try
                {
                    Program.server.commandPoolOderSo.Remove(Label);
                }
                finally
                {
                    Program.server.commandPoolOderSo.Add(Label,
                                                         new KeyValuePair <string, TurtleServer.Result>(currentCommand.Key, callback));
                }
            }

            byte[] buffer = System.Text.Encoding.UTF8.GetBytes(currentCommand.Key);
            currentResponse.ContentLength64 = buffer.Length;
            currentResponse.OutputStream.Write(buffer, 0, buffer.Length);
        }
예제 #2
0
 public void AddCommand(string command, TurtleServer.Result callback)
 {
     commands.Enqueue(new KeyValuePair <string, TurtleServer.Result>(command, callback));
 }