Re: socket shutdown leaking FCBs
Re: socket shutdown leaking FCBs
- Subject: Re: socket shutdown leaking FCBs
- From: daniel <email@hidden>
- Date: Fri, 28 Jan 2005 13:31:58 -0800
Would it be better to call CFSocketInvalidate on the CFSocket? Unless
configured otherwise, this will automatically close the underlying
socket.
From CFSocket.h:
"Do not in either case close the underlying native socket without
invalidating the CFSocket."
Daniel
On Jan 27, 2005, at 3:51 PM, Douglas Davidson wrote:
On 2005-01-27 15:46:13 -0800 Jeff Heyob <email@hidden> wrote:
The problem:
When I refuse a connection, 'net' is set to nil which then routes the
nativeSocketH to the call shutdown().
I use sSocketRefusedCount to debug the number of refusals and
sSocketShutdownErrorCount to track the number of errors from
shutdown(). sSocketShutdownErrorCount remains at zero which tells me
that shutdown() is working. However, over time the number of file
control blocks for the app reaches 256 then the app dies.
What else needs to be done when refusing a socket connection so that
the network resources are actually released?
Do I need to call release on nativeSocketH?
I believe you will need to call close() to actually release the file
descriptor.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden