1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-14 04:54:03 -04:00

move transport methods from net to io

This commit is contained in:
Darien Raymond
2016-01-29 13:39:55 +00:00
parent 06b92bddcf
commit 008c285324
21 changed files with 249 additions and 278 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/common/alloc"
v2io "github.com/v2ray/v2ray-core/common/io"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/proxy"
@@ -140,12 +141,12 @@ func (this *DokodemoDoor) HandleTCPConnection(conn *hub.TCPConn) {
}
func dumpInput(reader io.Reader, input chan<- *alloc.Buffer, finish *sync.Mutex) {
v2net.ReaderToChan(input, reader)
v2io.RawReaderToChan(input, reader)
finish.Unlock()
close(input)
}
func dumpOutput(writer io.Writer, output <-chan *alloc.Buffer, finish *sync.Mutex) {
v2net.ChanToWriter(writer, output)
v2io.ChanToWriter(writer, output)
finish.Unlock()
}