Close connection chan when socks client finishes sending data, and fix a performance issue in VMess decoding.

This commit is contained in:
V2Ray committed 2015-09-14 13:51:30 +02:00
1 parent 194abb9d6c
commit e7ce2c7166
8 files changed
+66 -171

No files matched your search

+5 -1
View File
@@ -1,12 +1,16 @@
package core
const (
bufferSize = 16
)
type Ray struct {
Input chan []byte
Output chan []byte
}
func NewRay() Ray {
return Ray{make(chan []byte, 128), make(chan []byte, 128)}
return Ray{make(chan []byte, bufferSize), make(chan []byte, bufferSize)}
}
type OutboundRay interface {