×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    13

    RecvOneOrMore to 1st RSocket causes KErrEof on 2nd RSocket

    I have three objects: SocketManager, SocketReader, and SocketWriter that are based on the Sockets example app and manage a single TCP connection over GPRS. I have no trouble when I instantiate one set of these objects to manage a 1st connection. But when I instantiate a second set to manage a 2nd simultaneous TCP connection, I am noticing some odd behavior:

    When I have a RecvOneOrMore pending on the first connection and I call RecvOneOrMore on the second connection, the first connection immediately gets a KErrEof. If the first connection then retries its RecvOneOrMore, it gets KErrEof again, and so on for a total of 3 KErrEofs and then I get a KErrDisconnected. This is easily reproducable on the EPOC emulator. I have not yet tried it on the 3650 phone.

    My Socket* objects do not share any data and have no static data or methods. As in the Sockets example, my SocketManager object has a RSocket object as a member (not a pointer to an RSocket), so I know that the 2 SocketManager objects are not sharing the same RSocket.

    For now I am working around this by taking turns issuing reads to these 2 sockets, and luckily that is OK for my application. But this seems like a bug.

    Is RSocket designed to have multiple independent instances, or is it designed to have only one instance?

    Eric

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    35
    It is funny, we have a similar problem...
    We use 2 instances, too, but in our case, we handle two different connections at the same time. Or at least that is what we try, because when the second one connects, we receive a KErrCancel on the first one...

    Did you find a solution? Anyone have any ideas?

    Thanks

Posting Permissions

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