> PPS: Ask yourself: how is it that it's *EVER* possible for the function
> soisdisconnected() to be called without the socket buffer having been
> emptied *FIRST*.
I think it is quite simple. Say that the machine to which you are
talking is powerd down while you are sending data to it. When you
David Malone wrote:
> > A shutdown guarantees that the data is transferred from the socket
> > buf to the TCP buf. The real question here is how you get to the
> > state you claim is happening: the so isdisconnected() should stall
> > the calling process until the data has drained, if this is the
> A shutdown guarantees that the data is transferred from the socket
> buf to the TCP buf. The real question here is how you get to the
> state you claim is happening: the so isdisconnected() should stall
> the calling process until the data has drained, if this is the case,
> or it should never
] When soisdisconnected is called on a socket, the connection is
] marked as broken the socket can't recieve or send any more data.
] As far as I can tell, any data which is queued for output cannot
] be sent, but remains queued in the socket until it is closed.
]
] The patch below makes soisdisc