title: need help with basic use of TIdCmdTCPServer
body: <p>I'm working on a proof-of-concept app using TIdCmdTCPServer in delphi XE.</p>
  
  <p>There seems to be something wrong with my code because only the first command works.  If i repeat the same command, it "times out".  See client code listing farther down below.</p>
  
  <p>here's my command handler:</p>
  
  <pre><code>procedure TForm1.IdCmdTCPServer1CommandHandlersGetDateTimeCommand(ASender: TIdCommand);
  begin
    ASender.Reply.SetReply(200, 'OK!');
    ASender.Reply.Text.Add(DateTimeToStr(Now));
    ASender.SendReply;  // I expect this must be redundant
  end;
  </code></pre>
  
  <p>Here's the server component (nothing special here; I set the port # and created a command handler):</p>
  
  <pre><code>object IdCmdTCPServer1: TIdCmdTCPServer
    Bindings = &lt;&gt;
    DefaultPort = 7000
    CommandHandlers = &lt;
      item
        CmdDelimiter = ' '
        Command = 'GetDateTime'
        Disconnect = False
        Name = 'TIdCommandHandler0'
        NormalReply.Code = '200'
        ParamDelimiter = ' '
        ParseParams = True
        Tag = 0
        OnCommand = IdCmdTCPServer1CommandHandlersGetDateTimeCommand
      end
    ExceptionReply.Code = '500'
    ExceptionReply.Text.Strings = (
      'Unknown Internal Error')
    Greeting.Code = '200'
    Greeting.Text.Strings = (
      'Welcome')
    HelpReply.Code = '100'
    HelpReply.Text.Strings = (
      'Help follows')
    MaxConnectionReply.Code = '300'
    MaxConnectionReply.Text.Strings = (
      'Too many connections. Try again later.')
    ReplyTexts = &lt;&gt;
    ReplyUnknownCommand.Code = '400'
    ReplyUnknownCommand.Text.Strings = (
      'Unknown Command')
    Left = 64
    Top = 8
  end
  </code></pre>
  
  <p>here's the client code where the problem occurs:</p>
  
  <pre><code>  Client.Connect;
    try
      // retrieve welcome text
      memo1.lines.AddStrings(Client.LastCmdResult.Text);
  
      Client.SendCmd('GetDateTime', 200);
      memo1.lines.AddStrings(Client.LastCmdResult.Text);
  
      //////////////////////////// FAILS HERE (timeout)
      Client.SendCmd('GetDateTime', 200);
      memo1.lines.AddStrings(Client.LastCmdResult.Text);
    finally
      Client.Disconnect(true);
    end;
  </code></pre>
  
  <p>and the client component (nothing special here; i set the host &amp; port #):</p>
  
  <pre><code>object Client: TIdCmdTCPClient
    ConnectTimeout = 1000
    Host = '127.0.0.1'
    IPVersion = Id_IPv4
    Port = 7000
    ReadTimeout = 1000
    CommandHandlers = &lt;&gt;
    ExceptionReply.Code = '500'
    ExceptionReply.Text.Strings = (
      'Unknown Internal Error')
    Left = 144
    Top = 96
  end
  </code></pre>
  
  <p>Any ideas why is this happening?  </p>
  
  <p>Thank you!
  mp</p>