Results 1 to 8 of 8

Thread: Delphi 7, Indy TCP Components & Timers

  1. #1

    Delphi 7, Indy TCP Components & Timers

    I have just ported all my code from Delphi 4 to Delphi 7, phew.

    After changing to Delphi 7 I am experiencing some wierd problems with the Indy Components and Timers. There is a timer on the login form that reads the TCP Socket at intervals. Once the form is displayed, it connects to the server socket and then starts the Timer. The timer appears to get no CPU, almost like the socket is hogging it. Even with an AntiFreeze component on there it makes no difference?

    If I step through the code it works If I halt the code in execution (letting it just run until the timer isn't responding), it's nearly always sat at NTWaitForSingleObject.

    Any ideas?
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    Re: Delphi 7, Indy TCP Components & Timers

    I dont know, Indy is blocking socket component. Consider to use non-blocking component, like SDL net.

    Quote Originally Posted by Gadget
    I have just ported all my code from Delphi 4 to Delphi 7, phew.

    After changing to Delphi 7 I am experiencing some wierd problems with the Indy Components and Timers. There is a timer on the login form that reads the TCP Socket at intervals. Once the form is displayed, it connects to the server socket and then starts the Timer. The timer appears to get no CPU, almost like the socket is hogging it. Even with an AntiFreeze component on there it makes no difference?

    If I step through the code it works If I halt the code in execution (letting it just run until the timer isn't responding), it's nearly always sat at NTWaitForSingleObject.

    Any ideas?

  3. #3

    Delphi 7, Indy TCP Components & Timers

    Thats awsome! 2 Years and over a Month later, gadget got a reply... LOL
    I have a 2005 CRF 250 so <^>(>&lt<^>
    <br />http://www.gtrpg.com/

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Delphi 7, Indy TCP Components & Timers

    Uh... I think you should look at the dates for the post not when the members joinned.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5

    Delphi 7, Indy TCP Components & Timers

    Try dropping an IdAntiFreeze on the form, that sometimes fixes Indy right up.

  6. #6

    Delphi 7, Indy TCP Components & Timers

    Quote Originally Posted by K4Z
    Try dropping an IdAntiFreeze on the form, that sometimes fixes Indy right up.
    Hmm,

    Me thinks you didn't read my thread :?


    I had no problem at all using Delphi 4 with Indy components! Only since moving to Delphi 7 is this an issue! I am sure it's got nothing to do with them being blocking type as the old ones were, AND the clue here is that when in debug in the IDE it all works, it's only when it runs itself that the timer event never fires (at all).

    AntiFreeze makes no difference at all >.<
    http://www.c5software.co.uk (site is being developed at the moment)

  7. #7

    Delphi 7, Indy TCP Components & Timers

    OK, more information on this problem.

    Timers have nothing to do with it! It appears that my main game loop is never running, because the application is never going into OnIdle state?

    I have tried changing the IdAntiFreeze settings, OnlyOnIdle, priority etc, nothing seems to work? It's like the Indy components in Delphi 7 stop the app ever going into OnIdle?
    http://www.c5software.co.uk (site is being developed at the moment)

  8. #8

    Delphi 7, Indy TCP Components & Timers

    OK, problem solved

    I upgrade Indy to version 10, and all is OK =D It looks like there is somekind of problem with the Indy components that ship with Delphi 7.
    http://www.c5software.co.uk (site is being developed at the moment)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •