×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    11

    RSocket receive data problem.

    hi all,

    I have a problem in receiving data using RSocket base on RFCOMM,
    I am using RecvOneOrMore() to read data, but I want to know the ending of receiving a package.
    Doc said that:
    TRequestStatus &aStatus On completion, KErrNone if successful, otherwise one of the system wide error codes. Note that KErrEof indicates either that a remote connection is closed, and that no more data is available for reading, or the socket has been shutdown with option RSocket::EStopInput.

    but even no data available to read, I call RecvOneOrMore(), the aStatus is -2147483647 , NOT KErrEof.

    how can I know the receiving is ending with out judge data received.

    thanks.

  2. #2
    Registered User
    Join Date
    Nov 2008
    Posts
    11

    Re: RSocket receive data problem.

    Code:
    void CConnector::WaitAndReceive()
        {
        // cancel pending operations
        iSock.CancelRead();
        Cancel();
        // receive data from socket
        iState=EWaiting;
        iBufferRead.Zero();
        iSock.RecvOneOrMore(iBufferRead, 0, iStatus, iLen);
        LOGARG("WaitAndReceive Status = %d length = %d",iStatus.Int(),iLen());
        /*
        if(iLargeData)
        {
        	iBufferLarge.Zero();
        	iSock.Recv(iBufferLarge,0,iStatus,iLen);
        }
        else
        {
        	iSock.Recv(iBuffer,0,iStatus,iLen);
        }
        */
        SetActive();
        }

Similar Threads

  1. Problem in Data Streaming
    By Aaypee in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2008-10-23, 07:46
  2. Replies: 2
    Last Post: 2006-08-11, 20:51
  3. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  4. Problem in reveiving CIMD message with ":" within data
    By kunal_the_one in forum General Messaging
    Replies: 0
    Last Post: 2005-08-04, 07:09
  5. Application receive data from WAP (GPRS)!
    By ctpthanh in forum Symbian
    Replies: 0
    Last Post: 2005-04-28, 07:28

Posting Permissions

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