>
> Either use non-blocking sockets or do the reading in a separate
thread.
thanks for your reply.
here is my code:
FSocketStream.TimeOut := 6000;
FSocketStream.Write(buff, FMemStream.Size);
Application.ProcessMessages;
if FSocketStream.WaitForData(6000) then
begin
TotalBytes := 0;
fillchar(buff, 1024, chr(0));
Application.ProcessMessages;
BytesRead := FSocketStream.Read(buff, 1024);
Application.ProcessMessages;
TotalBytes := Totalbytes + BytesRead;
repeat
BytesRead := FSocketStream.Read(buff, 1024);
Application.ProcessMessages;
TotalBytes := Totalbytes + BytesRead;
until BytesRead = 0;
end;
can you tell me how can i use it in a separate thread.
Thanks