Sockets Closing Unexpectedly
Sockets Closing Unexpectedly
- Subject: Sockets Closing Unexpectedly
- From: Jones Curtis <email@hidden>
- Date: Thu, 15 Mar 2007 21:22:09 -0400
My socket filter is deferring the sending/receiving of some data (and
specifically in this case, the receiving of some data) for a while
and the remote host is closing the socket connection before the data
has been re-injected and I've not been able to figure out how to
delay the closing of the socket (with respect to the local process
that's using the socket) until I've had a chance to re-inject the
deferred data.
I noted that by the time the detach callback is made, the socket is
already closed.
I noted that the notify callback is called first for
sock_evt_cantrecvmore then sock_evt_closing then
sock_evt_disconnecting and finally sock_evt_disconnected and that if
I block on any or all of those (until the data is re-injected), it
does not prevent the local process from finding out about the closed
socket - which appears to happen very shortly after the
sock_evt_cantsendmore notification.
I've started looking at sock_retain/release and they appear to delay
the closing/disconnecting/disconnected, but not the cantrecvmore.
I've dug through tcplognke and it doesn't appear to have any specific
provisions for this - it just blocks on sock_evt_disconnecting. So
I'm not sure what else to try at this point. Any suggestions?
Thanks.
--
Curtis Jones
email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden