What if your Close implementation sets a flag in the stream that, if set to true, causes it to respond to Read calls with an EOF?
There'd be some bookkeeping to keep track of the stream (so you can set its flag) then replace it with a new one the next time a client connects, effectively making each stream single-use. But you seem to be optimizing for rate of reads, not number of opens and closes you can do, so it seems that shouldn't be a blocker..
There'd be some bookkeeping to keep track of the stream (so you can set its flag) then replace it with a new one the next time a client connects, effectively making each stream single-use. But you seem to be optimizing for rate of reads, not number of opens and closes you can do, so it seems that shouldn't be a blocker..