[fpc-pascal] fphttclient, no way to specify a connect timeout
Luca Olivetti
luca at ventoso.org
Fri Feb 23 22:14:18 CET 2018
El 23/02/18 a les 19:34, Dimitrios Chr. Ioannidis via fpc-pascal ha escrit:
> Hi,
>
>
> Στις 23/2/2018 8:24 μμ, ο Luca Olivetti έγραψε:
>> El 23/02/18 a les 18:51, Dimitrios Chr. Ioannidis via fpc-pascal ha
>> escrit:
>>
>>>
>>> copy the ssockets.pp from <fpc sources>\packages\fcl-net\src dir
>>> to your project dir and add the following line
>>>
>>> SetIOTimeout(FIOTimeout);
>>>
>>> to Procedure TInetSocket.Connect; like this
>>
>>
>> fphttpclient already does that before calling connect and it doesn't
>> work.
>>
>
> emm it doesn't do that ...
yes, it does (in procedure TFPCustomHTTPClient.ConnectToServer)
FSocket:=TInetSocket.Create(AHost,APort,G);
try
if FIOTimeout<>0 then
FSocket.IOTimeout:=FIOTimeout; <-----
FSocket.Connect;
except
FreeAndNil(FSocket);
Raise;
end;
Bye
--
Luca
More information about the fpc-pascal
mailing list