Autor Beitrag
BattleFrog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Di 08.11.05 18:01 
Der folgende Code hängt bei mir in D7 mit Indy TCPClient und ich verstehs nicht.
Der Server antwortet (absichtlich) nicht, und das ReadLn erzeugt einfach keinen Timeout.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
  
  try
    TCPClient.Host := Host;
    TCPClient.Port := Port;
    TCPClient.Connect(5000);

    if not TCPClient.Connected then
    begin
      ...// raise exception
    end;

    buffer := 'STATUS?';
    TCPClient.WriteLn(buffer);
    buffer := TCPClient.ReadLn(#102000); // <------ hier hängt es fest

    if TCPClient.ReadLnTimedOut then
    begin
      ...// raise exception
    end
  except
    ...
  end;
BattleFrog Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

WIN 2000
Delphi 7 Ent.
BeitragVerfasst: Mi 09.11.05 11:58 
So is das also: TIdTCPConnection.ReadLn Timeout does not work

Problem gelöst durch Update der Indy Komponenten 9.0.10 -> 9.0.17

Ich danke euch für die zahlreichen Antworten...
NICHT :roll: