Lazarus
Programming => Networking and Web Programming => Topic started by: Serge58 on August 12, 2017, 12:22:59 am
-
Hello,
I am using the following to connect to my Arduino micro controller and it works perfectly.
url:='http://10.0.1.4/arduino/webserver/'
httpclient:= TFPHttpClient.Create(Nil);
try
html:= httpclient.Get(url);
finally
httpclient.Free;
However, if the board is not connected how do I cancel the request and send a message?
Right now my program just freeze when it happens and I have to kill it manually.
is there a timeout option that I can use?
Thanks,
-
is there a timeout option that I can use?
Look at source for TFpHttpClient. It has an IOTimeout property. Maybe that would work?
-
Well the TFpHttpClient that I am using doesn't have this IOtimeout property.
I there a way I can do it with a timer? Or as soon as it places a request it just wait for a reply?
-
Well the TFpHttpClient that I am using doesn't have this IOtimeout property.
It's in FPC 3.0.2, so upgrade.
-
Well I upgraded to the last version, Lazarus 1.6.4 and FPC 3.0.2, and TFPHttpClient still doesn't have a IOTimeout property.
Looking at the forum I found some notes about a opkman unit but is it relevant?