Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Funny error TCPclient
| Subject: | Funny error TCPclient |
| Posted by: | "GannTrader" (a@a.com) |
| Date: | Fri, 13 Oct 2006 23:32:27 |
Hi
Can someone explain why i have to do this.
What am i doing wrong.
See the code below at ***.
procedure TMyReadThread.connekt;
begin
FIndyClient.Connect;
end;
procedure TMyReadThread.Read_Stack;
var BytesInStack:integer;
begin
BytesInStack:=FIndyClient.IOHandler.InputBuffer.Size;
message1:=FIndyClient.IOHandler.ReadString(BytesInStack);
end;
procedure TMyReadThread.Execute;
var temp:string;
begin
Connekt;
while (not terminated) do
begin
if findyclient.Connected then // ***If i skip this line then
FIndyClient.IOHandler.InputBuffer.Size i always zero
temp:=''; // and therefore the
program never recieve any info from the server even if connected
Read_stack; // But it works if i have that
line.
// some code to take care of message1
end;
end;