×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Problem with RSocket.

    Hi,

    I have developed a XMPP client through which i communicate with Open Fire server and able to chat with the persons registered with Open fire server.

    When i use Emulator (s60 3rd ed fp-1), the application is working fine continuously with out any connection drop. But when i use my N95, connection is dropped if i am not using for more than 7~10 minutes.

    What could be the problem? Why the connection is closed in device and why not in emulator?

    Here is my code:

    TInt err = iSocketServ.Connect();
    User::LeaveIfError(err);

    TInt err = iSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp);
    User::LeaveIfError(err);

    After checking the Addressand resolving
    TInt result = iResolver.Open(*(iSocket->SocketServ()), KAfInet,
    KProtocolInetTcp);
    User::LeaveIfError(result);
    iResolver.GetByName(iAddressName, iHostEntry, iStatus);

    Connecting
    iSocket->Socket()->Connect(iAddr, iStatus);

    All the above steps are in Active object.

    Then, i am using Write() and RecvOneOrMore() for writing and receiving data respectively.

    Any thing i am missing in the above?

    Please share your ideas and help me.

    Thanks,
    Srivatsan D

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    47

    Re: Problem with RSocket.

    Hi,
    If your connection is idle for 7~10 mins, then because of Internal timeout of Socket/TCP it is dropping connection. If it is so then you may just ping to server after certain time period if connection is idle. By this way you can maintain same connection.
    I am naive to XMPP but refer 5.7.3. Handling of Idle Streams on http://xmpp.org/internet-drafts/draf...920bis-08.html
    Thanks
    Last edited by yddusane; 2009-02-25 at 11:04.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Problem with RSocket.

    Quote Originally Posted by srivatsan.d View Post
    Hi,

    I have developed a XMPP client through which i communicate with Open Fire server and able to chat with the persons registered with Open fire server.

    When i use Emulator (s60 3rd ed fp-1), the application is working fine continuously with out any connection drop. But when i use my N95, connection is dropped if i am not using for more than 7~10 minutes.

    What could be the problem? Why the connection is closed in device and why not in emulator?

    Here is my code:

    TInt err = iSocketServ.Connect();
    User::LeaveIfError(err);

    TInt err = iSocket.Open(iSocketServ, KAfInet, KSockStream, KProtocolInetTcp);
    User::LeaveIfError(err);

    After checking the Addressand resolving
    TInt result = iResolver.Open(*(iSocket->SocketServ()), KAfInet,
    KProtocolInetTcp);
    User::LeaveIfError(result);
    iResolver.GetByName(iAddressName, iHostEntry, iStatus);

    Connecting
    iSocket->Socket()->Connect(iAddr, iStatus);


    All the above steps are in Active object.

    Then, i am using Write() and RecvOneOrMore() for writing and receiving data respectively.

    Any thing i am missing in the above?

    Please share your ideas and help me.

    Thanks,
    Srivatsan D
    Could you tell
    What is in the red marked code?

  4. #4
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    204

    Re: Problem with RSocket.

    Hi Mahbub,

    Quote Originally Posted by mahbub_s60 View Post
    Could you tell
    What is in the red marked code?
    Thanks for the reply.
    Sorry i have made mistake while posting the code.
    It is just, iSocket->Connect(iAddr, iStatus);

    Thanks,
    Srivatsan

Similar Threads

  1. some problem in firmware 6680 V 5.04.07
    By man2007 in forum Symbian
    Replies: 1
    Last Post: 2007-01-26, 17:36
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. RConnection, RSocket and IAP UID problem
    By senyasumkin1 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-12-18, 14:26
  4. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  5. Replies: 0
    Last Post: 2004-10-13, 11:18

Posting Permissions

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