<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">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><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><div>Hm... If you change this internal funcion to a class method ...:</div><div><br></div><div><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>... the progress of download will be possible, getting the currenty stream size (or position?). :)</div><div><br></div><div>ps. i don't tested with chuncked content. :/</div>


</div></div></blockquote></div><div class="gmail_extra"><br></div>What do you think about implementa this method?:</div><div class="gmail_extra"><br></div><div class="gmail_extra">(...)</div><div class="gmail_extra" style>

public</div><div class="gmail_extra">    procedure ReadingResponse(const ASize, APosition: Int64); virtual;</div><div class="gmail_extra">(...)<br></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Called internally by ReadResponse. (triggered by normal and chunked reading)<br clear="all"><div><br></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>