[fpc-pascal] fphttclient, no way to specify a connect timeout
luca at ventoso.org
Sat Feb 24 15:06:09 CET 2018
El 24/02/18 a les 13:00, Luca Olivetti ha escrit:
> Sure, with some combination of kernel/winsock version it could possibly
> work (with mine it doesn't), but then it would be just enough to set the
> IoTimeout in the TFpHttpClient (which I'm already doing), no need to
> modify ssockets.pp.
Correction: it works in linux (IIRC it didn't some years ago, now it's a
documented feature, see https://linux.die.net/man/7/socket) but it
doesn't in windows (where the only option is to use a non-blocking socket).
Unluckily enough, my current target is windows :-(
procedure TForm1.Button1Click(Sender: TObject);
on e:exception do
The timeout is roughly 500 ms under linux, 18-20 seconds under windows
(xp/7, didn't test 10).
More information about the fpc-pascal