Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User maniac_2k's Avatar
    Join Date
    Dec 2003
    Location
    Munich, Germany
    Posts
    30
    Hi!

    I have a problem with my timer which is supposed to control a connection attempt.

    It is started with a timeout of 50 seconds when a connection attempt is called by a RSocket object (RSocket::Connect()). On expiration it is supposed to initiate the cancellation of the connection attempt by invoking the necessary code in the Timer's RunL() method. If the socket gets connected earlier, the Timer is cancelled (CTimer::Cancel).

    However, the Timer seems to expire too early. The connection is established, and right after the timer expires. The RunL() method of the object owning the RSocket object is not even called (to confirm the succesful connection attempt).

    Can anybody please explain me WHEN the CTime::RunL() method is called? Only on expiration of the timer, or sometime else as well?

    Thanks in advance,

    Maniac

  2. #2
    Registered User ricardo_hotton's Avatar
    Join Date
    Mar 2003
    Posts
    12
    1 second = 1000000

    Just in case the problem is here.

    Otherwise
    Do you have socket connection and the timer in the same class. You maybe passing the same TRequestStatus to both request providers. (timer and socketserver)

    So the setting of the TRequestStatus = KErrNone from the socket server is causing your timer runl to be called aswell

    This just a guess.

    Rich
    Last edited by ricardo_hotton; 2004-08-13 at 12:38.

  3. #3
    Super Contributor sopta007's Avatar
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    what kind of timer? Remember that there are also periodic timers and in that case you can set 2 values: when the first "tick" should occur and period...

  4. #4
    Registered User a_v_s's Avatar
    Join Date
    Jul 2006
    Posts
    15
    I have a different problem with this exact same scenario. When the connection is established, I cancel the CTimer. However, it takes 20-25 seconds for the Cancel method to run, which screws up the rest of my program. I have no idea why it takes so long to run Cancel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved