本人用indy组件遇到重大问题,请教各位高手,代码如下procedure TForm1.TCPServerExecute(AThread: TIdPeerThread);
var str, sTemp : string;
begin
   str :=AThread.Connection.CurrentReadBuffer;  while str <> ''do
   begin
    mystr := str + mystr;
    str := AThread.Connection.CurrentReadBuffer;
   end;   showmessage(mystr);为什么去到AThread.Connection.CurrentReadBuffer那里就没有反应了??有什么办法清空CurrentReadBuffer?
end;

解决方案 »

  1.   

    sStr := AThread.Connection.CurrentReadBuffer换成readln看看有什么办法清空CurrentReadBuffer?你试试AThread.Connection.InputBuffer.Clear;
      

  2.   

    readln、ReadBuffer什么的都会在那里停止,除非它真正接收到了信息。
      

  3.   

    当CurrentReadBuffer没有值的时候不是返回一个''字符串吗?
      

  4.   

    按照delphi中indy的帮助中说,当CurrentReadBuffer没有值的时候不是返回一个''字符串 ,但事实上CurrentReadBuffer没有返回啊!为什么啊?各位高手帮下手啦!