1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-05 16:55:27 -05:00

refactor multibuffer

This commit is contained in:
Darien Raymond
2018-11-18 19:36:36 +01:00
parent 0f324a613e
commit 842a089dad
19 changed files with 147 additions and 161 deletions

View File

@@ -100,7 +100,7 @@ func (c *connection) Write(b []byte) (int, error) {
l := len(b)
mb := make(buf.MultiBuffer, 0, l/buf.Size+1)
common.Must2(mb.Write(b))
mb = buf.MergeBytes(mb, b)
return l, c.writer.WriteMultiBuffer(mb)
}