0

I have one simple question that is care me. It's about Sockets API in Symbian.

How should I close the current long async operation? For example, if I doing the operation like CSecureSocket::StartClientHandshake for GPRS it's quite long operation. If I want to close my app,I should call Cancel() that is sync op. and I'm waiting about 3 minutes while the CSecureSocket::StartClientHandshake will be completed.

It's not that I want. Instead I calls CSecureSocket::Close(). It broke my handshake process, closed the socket. But the next time I get a callback MyClass::Run with error Canceled. It's normal if I don't close my app. But it's a mistake if I delete my MyClass.

If I want to delete MyClass, the ~MyClass should call the Cancel() but it will keep me waiting about 3 minutes.

And it's my question: how should I close the long async operation ?

user1500049
  • 993
  • 7
  • 15

1 Answers1

0

AFAIK calling Close should internally call Cancel for all running operations. Thats why you get this Canceled notification. So when deleting your MyClass then also call Close, not Cancel.

Riho
  • 4,523
  • 3
  • 33
  • 48