Re: socket equivalent of OTCancelSynchronousCalls
Re: socket equivalent of OTCancelSynchronousCalls
- Subject: Re: socket equivalent of OTCancelSynchronousCalls
- From: Larry Gerndt <email@hidden>
- Date: Fri, 03 Jan 2003 23:47:07 -0800
>
I am in the process of changing a program so that it uses BSD sockets
>
instead of open transport.
>
My application does its network business from MP threads (synchronous,
>
blocking endpoints). Before, when i wanted to abort a network
>
operation, I would send a message to the thread's queue and call
>
OTCancelSynchronousCalls in case the task was blocked on some network
>
operation.
>
What should I do, now that I am using sockets?
Well, I9ve been using these BSD socket calls to do that:
shutdown(mSocket, SHUT_RDWR);
close(mSocket);
This does seem to unblock the thread. However, I have to wonder if it9s
safe because on 10.1 (and not on 10.2) I have a bug which I stated in a
prior post. The bug is that when I close one connection, the other
connection crashes inside either read or write. I am still stumped by that
bug.
P.S. I am doing the exact same kind of networking you9re doing (MPTasks
making synchronous blocking calls).
--
Larry Gerndt
AIM Handle: SonOfMannn
3Let the truth be told though the heavens fall2 James Garrison
_______________________________________________
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.