Closed belak closed 4 years ago
There is another option where we use a net.Conn - this may actually be useful because then we can use SetDeadline properly.
I think this is fine for now because it's the least intrusive. I don't know what a better interface would look like, but if we can improve on this in the future I'd like to.
This is technically a backwards incompatible change as it updates the Client to require a ReadWriteCloser rather than just a ReadWriter. This makes it possible to force the readLoop to exit.
This builds on PR #72 by @SeanLatimer