mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 15:02:10 +00:00
use stream instead of raw chan
This commit is contained in:
1 parent
42b8dbe871
commit
7407c8d561
25 files changed
+217
-188
No files matched your search
@@ -42,13 +42,14 @@ func (this *InboundConnectionHandler) Communicate(packet v2net.Packet) error {
|
||||
writeFinish.Lock()
|
||||
|
||||
go func() {
|
||||
v2io.RawReaderToChan(input, this.ConnInput)
|
||||
close(input)
|
||||
v2io.Pipe(v2io.NewAdaptiveReader(this.ConnInput), input)
|
||||
input.Close()
|
||||
readFinish.Unlock()
|
||||
}()
|
||||
|
||||
go func() {
|
||||
v2io.ChanToRawWriter(this.ConnOutput, output)
|
||||
v2io.Pipe(output, v2io.NewAdaptiveWriter(this.ConnOutput))
|
||||
output.Release()
|
||||
writeFinish.Unlock()
|
||||
}()
|
||||
|
||||
|
||||
Reference in new issue
Block a user