×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    37

    Api Connection Monitor Server

    Hi all! I'm trying to use the bellow API for test my conections but I found any problens. My applications is running in a console mode and I have to know if there is any connection active. When my application is running, an error is showed in GetConnectionCount() function. What are the possible reasons for it's happen? Sorry my bad english!

    The bit of code:

    int main(void)
    {

    RConnectionMonitor monitor;
    TUint Count;
    TRequestStatus aStatus;

    printf("Protótipo!\n");//It's portuguese

    monitor.ConnectL();

    monitor.GetConnectionCount(Count, aStatus);

    if(aStatus.Int() != KErrNone)
    {
    printf("\nError in the function GetConnectionCount");
    }

    printf("\nNumber of connections %d",Count);
    ...
    ...
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Api Connection Monitor Server

    if you could tell what the error is, it could help on determining what goes wrong.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    37

    Re: Api Connection Monitor Server

    I'm sorry for this, but the first topic error was resolved.
    I'm learning/testing/using the API con monitor server.
    I'm using any methods whithout problem, but anothers show erros, for example:
    I'm trying to use this;

    monitor.GetUIntAttribute( CIaConnectionID , 0 , KDownlinkData , aValue , aStatus );

    but the carbide show a message "undefined identifier 'GetUIntAttribute' ".
    I think that isn't a error about configurations because I put the libs(esock,insock,cmmanager,connmon) in the .mmp file and the headers(es_sock.h,in_sock.h,rconnmon.h) are ok too. It's method above whith show this error.

    About the first topic, the problem was: I did'nt put this:
    User::WaitForRequest( aStatus );

    Sorry my bad english! See you later!

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Api Connection Monitor Server

    Gotta say that the error puzzles me as well, the GetUIntAttribute function appears to be defined in RConnectionMonitor and it should be usable..

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    37

    Re: Api Connection Monitor Server

    It's really very strange, but it's changed. Today I rewrote my code and the same erro was showing, but I move the line(bellow) for a conditional block where it's executed only if there is a connection and the show don't appear again.

    My line:
    erro = monitor.GetSubConnectionInfo (aConnectionId , Count , aSubConnectionID);

    More strange that is: when I put the line above in the first position(whithou of the conditional block) the carbide didn't show error. But, it's normal now.

    The problem now is: when my application is running, the above function is retorning "-5", where I think that means "KErrNotSupported" because -5 correspond to KErrNotSupported in e32err.h. My question now is: this funcion return this value because the emulator don't support this?

    Thank's for reply!

  6. #6
    Registered User
    Join Date
    Sep 2008
    Posts
    37

    Re: Api Connection Monitor Server

    Hi people!
    Please ignore the previus messages. I wanto to know basicaly how to count the traffic send/received whith a api connection monitor server and if it is possible to test this code in the emulator.

    Sorry the disturb!

Similar Threads

  1. API to pass the URL in Bluetooth Connection
    By BhargaviSomisetty in forum Symbian
    Replies: 1
    Last Post: 2008-01-12, 12:39
  2. HTTP connection on 6310i, 7650, 9210 and in sony-ericsson p800
    By mika1982 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-07-24, 16:44
  3. Replies: 1
    Last Post: 2003-07-11, 15:10
  4. Nokia 3585i and PC Suite 4.95; NO CONNECTION
    By chrism2202 in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2003-04-21, 12:10
  5. TCP/IP connection with JavaPhone API
    By nkn_motoko in forum Mobile Java General
    Replies: 1
    Last Post: 2001-11-06, 20:33

Posting Permissions

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