<div dir="ltr">2013/1/23 silvioprog <span dir="ltr"><<a href="mailto:silvioprog@gmail.com" target="_blank">silvioprog@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div>Hello,<br></div><div><br></div><div>First, sorry for my various requests. I'm contributing to improves this beautiful class.</div><div><br></div><div>So, how to show a download progress?</div>
<div>
<br></div><div>I think that the method "ReadResponse" should have two callbacks, like as "AContentLenght" and "AContentPosition". What do you think?</div><div><br></div><div>Thank you!</div>
</div></div></blockquote></div><div><br></div><div style>Hm... If you change this internal funcion to a class method ...:</div><div style><br></div><div style><div> Function Transfer(LB : Integer) : Integer;</div><div> begin<br>
</div><div> Result:=FSocket.Read(FBuffer[1],LB);</div><div> If Result<0 then</div><div> Raise EHTTPClient.Create(SErrReadingSocket);</div><div> if (Result>0) then</div><div> Stream.Write(FBuffer[1],Result);</div>
<div> end;<br></div></div><div><br></div><div style>... the progress of download will be possible, getting the currenty stream size (or position?). :)</div><div><br></div><div style>ps. i don't tested with chuncked content. :/</div>
<div><br></div>-- </div><div class="gmail_extra">Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>