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
@@ -33,15 +33,16 @@ func (this *OutboundConnectionHandler) Dispatch(packet v2net.Packet, ray ray.Out
|
||||
writeFinish.Lock()
|
||||
|
||||
go func() {
|
||||
v2io.ChanToRawWriter(this.ConnOutput, input)
|
||||
v2io.Pipe(input, v2io.NewAdaptiveWriter(this.ConnOutput))
|
||||
writeFinish.Unlock()
|
||||
input.Release()
|
||||
}()
|
||||
|
||||
writeFinish.Lock()
|
||||
}
|
||||
|
||||
v2io.RawReaderToChan(output, this.ConnInput)
|
||||
close(output)
|
||||
v2io.Pipe(v2io.NewAdaptiveReader(this.ConnInput), output)
|
||||
output.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user