Re: BSD socket accept() fd leak on iphone OS
Re: BSD socket accept() fd leak on iphone OS
- Subject: Re: BSD socket accept() fd leak on iphone OS
- From: Jack Brindle <email@hidden>
- Date: Fri, 25 Sep 2009 14:22:44 -0700
Quinn;
I would question this. A shutdown (or a close for that matter) simply
requests that the connection be closed. If any data was on its way, or
the other end finishes sending all its queued data before the close
request is accepted, then data could indeed be received after the
shutdown or close is executed. I don't believe (could be wrong) that
it simply drops the bits on the floor. At least this is my
understanding...
Jack Brindle
On Sep 25, 2009, at 1:01 PM, Jay Bone wrote:
Given that you've shut down the socket for both read and write, the
recv is guaranteed to fail, right?
Hm. Right I guess. I only added this shutdown() and this while(1)
{ read-rest-of-packets } code after googling for code on closing
sockets and trying to debug this fd issue.
Originally I was just calling close() and thinking that would be
enough.
_______________________________________________
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