The documentation on this function says it cancels any blocking Winsock call in the current thread. How is it possible to call WSPCancelBlockingCall from the same thread if there is a blocking call in progress?
The documentation on this function says it cancels any blocking Winsock call in the current thread. How is it possible to call WSPCancelBlockingCall from the same thread if there is a blocking call in progress?
The documentation states how it gets called. Either as a callback or via a service message.
You do not call WSP* functions. These are functions that are implemented by socket providers. You call these functions. As stated by the documentation for WSACancelBlockingCall, it is obsolete and must not be used in modern applications. It dates back from Win16. Instead of creating a thread (pre-emptive threads were not available in Win16), Windows would call a callback in the current thread so that the GUI could be kept functional. This scheme is described on this page.
Ok, then does anyone, have any suggestion on how to cancel a blocking call on a socket or thread?
Thanks
Call closesocket (I meant to mention this in my original post).
I can't do that. It is a socket that I have no control over and I can't just close it.Originally Posted by anonytmouse
Stop using a broken API then.
Broken API? O.o It isn't my socket...
I don't know what that means.