We are assuming here that the default for the protocol is an orderly release when the stream is closed, which is true for TCP.