Go's io.Reader and io.Writer interfaces are semantically overloaded IMHO. There are many possible behaviors of the Read() function according to EOF and stream/packet sources. Implementing all possible scenarios correctly would be complicated and error prone.
On the other way, our packets (de)serialization works strictly on byte buffers and is well-defined. So there is IMHO no reason to use Reader/Writer. If any client code really needs Reader/Writer, it can use e.g. bytes.Buffer as a wrapper...
Go's
io.Reader
andio.Writer
interfaces are semantically overloaded IMHO. There are many possible behaviors of theRead()
function according to EOF and stream/packet sources. Implementing all possible scenarios correctly would be complicated and error prone.On the other way, our packets (de)serialization works strictly on byte buffers and is well-defined. So there is IMHO no reason to use
Reader
/Writer
. If any client code really needsReader
/Writer
, it can use e.g.bytes.Buffer
as a wrapper...Merge after #36