[Solved] What are the alternatives to URLOpenBlockingStream. lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- loaded · 2021-11-06 08:29 Hi All, With the code in the example, I am downloading an image from the https site using the URLOpenBlockingStream method. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);var    //  add uses activex,comobj,urlmon,  ExchangeStream: IStream;  Pngstream: TOleStream;  crono:Cardinal;  furl:string;begincrono:=GetTickCount;   furl:='https://tile.openstreetmap.de/7/63/42.png';   //  https://wiki.openstreetmap.org/wiki/Tile_servers   if (URLOpenBlockingStream(nil, pchar(furl),ExchangeStream,0,nil)=0) then   begin   Pngstream:=TOleStream.Create(ExchangeStream);   image1.picture.LoadFromStream(Pngstream);   end; TButton(sender).Caption:=FloatToStr((GetTickCount-crono)/1000);  // about 0.031~ secondsend; This code downloads the image in the link in about 0.031~ seconds, uploads the Image and displays it. I have an application like leaflet  https://leafletjs.com/in my mind, for this, while I'm just at the beginning, I want to discover the fastest download method suitable for thread use. I will lay the groundwork for this today What alternatives to URLOpenBlockingStream can be used for this? Any ideas you share will be very valuable to me. Respects. ---------------------------------------------------------------------- Thaddy · 2021-11-06 09:32 A pure blocking alternative is synapse 4.1 There are more alternatives: packages: fcl-web/fcl-net gnutls Indy libcurl and probably more. All the packages mentioned are cross platform and all come with examples. You may want to choose one of these anyway, because they are not tied to windows. I guess the speed is more likely to be dependent on connection and internet speed. Less so on which method you use. My own preference is currently fcl-web/fcl-net because it is maintained by the core fpc team and pure Pascal. (or synapse, but fcl- web/fcl-net is very similar). Except for synapse all come with FPC/Lazarus as standard. Note that on windows only URLOpenBlockingStream  may be slightly faster, but still x-platform is a better option to me. ---------------------------------------------------------------------- loaded · 2021-11-06 16:17 Thaddy Master, thank you for spending your valuable time and sharing your valuable experience. This information became like lights on the road. They're pretty good for a start. ---------------------------------------------------------------------- trev · 2021-11-06 21:29 For Windows, my favourite is the WinInet API because it avoids OpenSSL DLL hell. ---------------------------------------------------------------------- loaded · 2021-11-12 13:48 Thaddy and trev who replied, thank you as much as the number of letters in your messages. After extensive experimentation, I decided to use WinINet. -Almost the same speed as Chrome. -In different windows versions, also different http and https servers work without problems. -No Dll dependencies For now, these are very, very good enough for me. Also, what I learned was extra.