[Lazarus] TFPHttpClient: download progress (or status).
silvioprog at gmail.com
Wed Jan 23 18:17:54 CET 2013
2013/1/23 silvioprog <silvioprog at gmail.com>
> 2013/1/23 silvioprog <silvioprog at gmail.com>
>> First, sorry for my various requests. I'm contributing to improves this
>> beautiful class.
>> So, how to show a download progress?
>> I think that the method "ReadResponse" should have two callbacks, like as
>> "AContentLenght" and "AContentPosition". What do you think?
>> Thank you!
> Hm... If you change this internal funcion to a class method ...:
> Function Transfer(LB : Integer) : Integer;
> If Result<0 then
> Raise EHTTPClient.Create(SErrReadingSocket);
> if (Result>0) then
> ... the progress of download will be possible, getting the currenty stream
> size (or position?). :)
> ps. i don't tested with chuncked content. :/
What do you think about implementa this method?:
procedure ReadingResponse(const ASize, APosition: Int64); virtual;
Called internally by ReadResponse. (triggered by normal and chunked reading)
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus