mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 05:55:20 -05:00
use stream instead of raw chan
This commit is contained in:
@@ -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