×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    8

    How to discover a connection close

    Hi all,

    I am developing a network game in 7650 based on Symbian RSocket. After read through the example "Socket example" provided by the SDK, I modified the socket engine to fit my application. (Basically, the logic are the same as in the example, most of the changes are related to UI and the way to notify user when connection state changes)

    Everything works fine except the following conditions.
    1) When phone is disconnected from the network (e.g. disconnect the MRouterLite).

    It doesn't report anything during the first call to IssueWrite(). Error occurs during the second IssueWrite(). Well, it is not too critical as it is hard for user to discover.

    2) When the server crash (e.g. I close the server after connected).

    Neither Read nor Write operations would tell me (or the application itself) the connection is closed. While in VC++, the read() will return negative value in the same case. Does it matters to the case that RecvOneOrMore() cannot discover connection close. If so, what can be help to my application. Thks a lot.

    btw, it is strange that the application can even perform Write() without any errors after the server crash. Err.....can anyone know the reasons?? Thks again.

    Jacob

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    8
    Sorry that I have made a mistake by checking the wrong variable. Now I got KErrEof. My problem seems to be fixed.

    Thanks again,

    Jacob
    Last edited by jacobckh; 2003-10-21 at 12:29.

Posting Permissions

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