For the shut_rd case, I think a cleaner impl is to send RST *only* if there is
pending data (received but not read by the user) or new data is received after
the read end is closed. At the moment I don't recall what BSD does but you
don't have to allow draining once the read end is closed. Just
Has anyone looked into implementing this? Can anyone comment on the
details?
For the curious, this is described here:
https://tools.ietf.org/html/rfc1122#page-87
Go net package (https://github.com/golang/go/issues/17906).
As I understand it, one would only worry about 'shutdown' if the connectio