<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Em 24.10.2014 09:54, silvioprog escreveu:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Fri, Oct 24, 2014 at 8:41 AM, Michael Van Canneyt <span><<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>></span>wrote:
<blockquote class="gmail_quote" style="margin: 0px  0px  0px  0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;">On Fri, 24 Oct 2014, Philippe wrote:
<blockquote class="gmail_quote" style="margin: 0px  0px  0px  0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;">Using basically HTTPClient.Get, I did not find time out configuration with fphttpclient. Did I missed it?</blockquote>
<br /> it does not exist yet.<br /><br />
<blockquote class="gmail_quote" style="margin: 0px  0px  0px  0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;"><br /> If not, is there a way to implement it ? Using thread?</blockquote>
<br /> that would be one way.<br /><br />
<blockquote class="gmail_quote" style="margin: 0px  0px  0px  0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;"><br /> If not, is there a similar library/unit with configurable timeout?</blockquote>
<br /> synapse probably has it.<br /><br /> Michael.</blockquote>
</div>
<div> </div>
<div> </div>
<div>You could implement the timeout directly in the internal FSocket in TFPHttpClient(*). I implemented that using "GetTick"[1] and "TTimeVal"[2]:</div>
<div> </div>
<div>Just suggestions! =)</div>
<div> </div>
<div>(*) E.g:</div>
<div> </div>
<div>TFPCustomHTTPSocket = class(TInetSocket) // implementing the timout</div>
<div>..</div>
<div>
<div>  TFPCustomHTTPClient = Class(TComponent)</div>
<div>  private</div>
<div>...</div>
<div>    FSocket : TFPCustomHTTPSocket; // using TFPCustomHTTPSocket instead of TInetSocket directly because TFPCustomHTTPSocket implements the timeout</div>
</div>
<div> </div>
<div>[1] - <a href="https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipbase.pas#L105">https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipbase.pas#L105</a></div>
<div> </div>
<div>[2] - <a href="https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipclient.pas#L130">https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipclient.pas#L130</a></div>
<div> </div>
--<br />Silvio Clécio<br />My public projects - <a href="http://github.com/silvioprog">github.com/silvioprog</a></div>
</div>
</blockquote>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">Thanks ... may be a bit complicated for me now ... I keep it for later!</blockquote>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><br />
<pre>_______________________________________________
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
</pre>
</blockquote>
<p> </p>
</body></html>