Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Indy 9 TidTCPClient.WriteStream problem

www.cryer.info
Managed Newsgroup Archive

Indy 9 TidTCPClient.WriteStream problem

Subject:Indy 9 TidTCPClient.WriteStream problem
Posted by:"Tomislav Stamac" (tstam..@vip.hr)
Date:Wed, 27 Feb 2008 17:12:39

Hi,

I'm having trouble to show progress when sending stream in Indy 9
...

Client.OnWorkBegin:=MyOnWorkB;
Client.OnWork:=MyOnWork;
Client.OnWorkEnd:=MyOnWorkE;
try
  Client.WriteStream(FileStream,True,True)
finally
  Client.OnWorkBegin:=nil;
  Client.OnWork:=nil;
  Client.OnWorkEnd:=nil;
end;

OnWork never gets called.

In Indy 8 I used tprogresstream for showing progressbar where
tprogressstream had OnRead(Bytesread:cardinal); method.
In Indy 9 I cant use it because Indy 9 seems to read all stream in the
internal buffer or something and after that it sends stream,
ofcourse my progressbar is on 100% at that point.

Is there another way?

Replies:

www.cryer.info
Managed Newsgroup Archive