On Tue, Mar 19, 2019 at 12:25 PM Thomas Munro <thomas.mu...@gmail.com> wrote:
> 2.  Linux, FreeBSD and Darwin gave slightly different error sequences
> when writing after the remote connection was closed (though I suspect
> they'd behave much the same way for a connection to a remote host),
> but all allowed the "goodbye" message to be read, so the answer there
> is "yes".

Qualification, after some off-list discussion with Andrew Gierth: even
though that appears to work in happy tests on those TCP
implementations, it may be that they can't really guarantee that it
works in adverse conditions, because the server may not be able to
retransmit packets that preceded the reset but somehow went missing,
and it's also not clear what happens if they arrive out of order.
Dunno.  (Oh man, all this hidden magic, is it actually possible to
write working application code without imbibing Stevens TCP/IP
Illustrated?  It's a bit like last year's work on filesystem quirks,
when I realised that man pages are nice and all, but you basically
need to read the source or talk to someone who has...)

-- 
Thomas Munro
https://enterprisedb.com

Reply via email to