move transport methods from net to io

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

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import (
"sync"
"github.com/v2ray/v2ray-core/app"
v2io "github.com/v2ray/v2ray-core/common/io"
v2net "github.com/v2ray/v2ray-core/common/net"
)
@@ -41,13 +42,13 @@ func (this *InboundConnectionHandler) Communicate(packet v2net.Packet) error {
writeFinish.Lock()
go func() {
v2net.ReaderToChan(input, this.ConnInput)
v2io.RawReaderToChan(input, this.ConnInput)
close(input)
readFinish.Unlock()
}()
go func() {
v2net.ChanToWriter(this.ConnOutput, output)
v2io.ChanToWriter(this.ConnOutput, output)
writeFinish.Unlock()
}()