Canceling a asynchronous request ???
Canceling a asynchronous request ???
- Subject: Canceling a asynchronous request ???
- From: Mark Thomas <email@hidden>
- Date: Thu, 13 Feb 2003 14:36:06 +0000
- Organization: Coderus Ltd
Hi,
Does anyone know how you would stop an endpoint listening, as I have setup
an UDP listener asynchronously
OTInstallNotifier(endPoint,
NewOTNotifyUPP((OTNotifyProcPtr)notifyProc), &gMessage );
OTSetAsynchronous(endPoint);
OTScheduleTimerTask (
OTCreateTimerTaskInContext(NewOTProcessUPP(cancelProc), endPoint, NULL) ,
5000 );
err = OTRcvUData(endPoint, &udata, NULL );
And I have a timer which will :-
pascal void cancelProc(EndpointRef pEndPoint)
{
// OTCancelSynchronousCalls( pEndPoint, -1234 );
int err = OTCloseProvider( pEndPoint );
gWait = 0;
}
The only way I can see, to stop this end, is to completely shut it down,
via OTCloseProvider, as OTCancelSynchronousCalls isn't going to work, as it
searches the synchronous requests only ???.
I also guess that doing an OTCloseProvider within a notifier is bad news,
as it could effect memory ???.
Any ideas, how I can stop when the timer executes ???.
Thanks
Mark.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.