×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Switzerland
    Posts
    61

    Problem: RGenericAgent::Progress does not detect open connection

    Hi,

    I have a big problem in my app. When I connect to internet using RGenericAgent::StartOutgoing I first check if there already is an open connection, using RGenericAgent::Progress, and check the returned TNifProgress value for EConnectionOpen (if no connection I start one).

    Problem is, a lot of the times Progress fails to detect that there is an open active connection there already, which results in StartOutgoing just hanging, doing nothing. I've got a timer in my active object, and it times out every time this happen. The iStatus has not been updated, even when it's been sitting there for 2 minutes.

    Has anyone else seen this problem? Why would Progress not detect that there already is an open connection?

    I'd be most grateful for any info!

    Cheers,
    Bjorn Rudolfsson

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    113

    RGenericAgent::NetworkActive(TBool&)

    Hi Bjorn,

    I have done something similar, but I use the NetworkActive() member to establish whether there is active connection...

    TBool isActive = EFalse;
    iAgent.NetworkActive(isActive);
    if (isActive)
    {
    // Active connection detected
    ConnectL();
    }
    else
    {
    // No active connection detected
    iAgent.StartOutgoing(*iOverride, iStatus);
    }

    -Mike

Posting Permissions

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