iqbal_delphidev wrote:
>     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.

Take out the ProcessMessages calls, and then move the code into another 
thread.

If you want more specific information about how to use threads, then ask 
a more specific question. Threads have been talked about before on this 
mailing list, so check the archives. Also check newsgroup archives.

-- 
Rob

Reply via email to