1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-25 05:39:06 -04:00

read directly from underlying buffered reader in mux

This commit is contained in:
Darien Raymond
2017-11-25 01:05:30 +01:00
parent 74327ea8ae
commit 6de4ef014a
5 changed files with 35 additions and 35 deletions

View File

@@ -1,7 +1,6 @@
package mux
import (
"io"
"sync"
"v2ray.com/core/common/buf"
@@ -139,7 +138,7 @@ func (s *Session) Close() {
}
// NewReader creates a buf.Reader based on the transfer type of this Session.
func (s *Session) NewReader(reader io.Reader) buf.Reader {
func (s *Session) NewReader(reader *buf.BufferedReader) buf.Reader {
if s.transferType == protocol.TransferTypeStream {
return NewStreamReader(reader)
}