Jump to content

APAPE

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by APAPE

  1. APAPE

    Webhook example

    After 2 years :-) there is no answer to the question, if there is an webhook example. I am using Delphi 2007. And now I would like to connect to a server side WebHook (the server should inform me). If the ICS components can not be used for it, how can it be realized in D2007? If ICS can be used, how? Please post an example code here as a starting point, or a link to an example. Thanks
  2. I have build a thread (using TIdThread), which can be startet multiple times to get data from different places. Each thread processes accesses one place / Url. I'm using a thread for each place to get the data of each of them totally as quick as possible. So the longest time is just the one which needs the longest time to retrieve the data. I set the property "MultiThreaded" to true in the component. Calling the .Post method does not work. I always get a timeout. If the same code is executed not as a self running thread, it works fine. I did not find any help on the internet. Does anybody knows why this timeout appears and how it can be moved away (so the thread does it's job)? I'm using Delphi 2007 and the main application also uses THttpCli components. Please help. Thx.
  3. APAPE

    IdThread and THttpCli

    I have debugged a little bit. In the unit "OverbyteIcsHttpProt" in class "THttpCli" in method "DoRequestSync", and in the while FState <> httpReady do loop the state (FState) is always "httpDnsLookupDone", but does not change any more. I looked a little bit deeper into unit "OverbyteIcsWSocket" into procedure TCustomWSocket.Connect where the method "WSocket_Synchronized_Connect" is being called, and this method returns 10035. I searched again in the internet and found the following site: https://stackoverflow.com/questions/16488603/overbyteics-http-timeout-when-used-in-different-threads And the S O L U T I O N is very simple: DO NOT CREATE THE ICS OBJECTS AT THREAD CREATION TIME, create and destroy them every time you need them in the thread! Hope, this helps to save others time in future
  4. APAPE

    IdThread and THttpCli

    I'm using the TIdThread object for many years, because it can be started and stopped without needing to destroy and recreate it. It is very handy. It does not make any difference, if I use a normal "TThread" or "TIdThread" for execution. The THttpCli object always throws an timeout exception and the requested URL is never been called. I do not use Indy for other things. I just use the TIdThread object.
×