net: export writeBuffers() and buffersWriter #21756
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Hello!
Looking at
net.Buffers.WriteTo()
implementation one can find that it uses type assertion to non-exported typenet.buffersWriter
. The proposal is to export this type and methods which implement it.Two things:
net.Conn
to get some i/o statistics, say:It becomes impossible to use
writev()
syscall –ConnWatcher
has no way to implement non-exportednet.buffersWriter
interface.*net.TCPConn
(rare case, but possible) to decorate some write behaviour:The last line of the example above
bs.WriteTo(cc)
will producecc.TCPConn.writeBuffers(bs)
call, sending raw data without encoding.Regards,
Sergey.
The text was updated successfully, but these errors were encountered: