locked
GPRS connection lost RRS feed

  • Question

  • Hi, I use gprs connection in my application. When I minimize my application (using cross in up-right corner) all work ok. But if I minimize application with red button (don't know it correct name, something like "end call"), my application minimizing, but lost GPRS connection. In that case I have following exceptions:
    System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
    and then when I try to close socket:
    System.Net.Sockets.SocketException: An operation was attempted on something that is not a socket

    Its not so critical for me, I can establish connection again, but I think there is another solve of this bloblem.
    Can anyone help me?
    Cheers, krechet777
    Friday, May 8, 2009 8:27 AM

Answers

  • Hi Kretchet777,

    I think what you are seeing is expected behaviour.

    When you press and hold the Red "end call" hardware button you are requesting the operating system shutdown the existing GPRS data connection.

    The exception you are catching within your application is simply telling you that your blocking call is returning due to an error condition (i.e. the lack of data connection).

    As you mention if you handle this exception you can easily re-establish a connection and gracefully continue. As far as I am aware there is no easy way to fully disable this feature of the end call hardware key.

    Hope this helps,
    Christopher Fairbairn
    Visit my blog at http://www.christec.co.nz/blog/
    Monday, May 11, 2009 12:28 AM