1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-10-08 20:19:10 -04:00
v2fly/vray.go
2015-09-11 00:24:18 +02:00

37 lines
628 B
Go

package core
type VRay struct {
Input chan []byte
Output chan []byte
}
func NewVRay() VRay {
return VRay{make(chan []byte, 128), make(chan []byte, 128)}
}
type OutboundVRay interface {
OutboundInput() <-chan []byte
OutboundOutput() chan<- []byte
}
type InboundVRay interface {
InboundInput() chan<- []byte
InboundOutput() <-chan []byte
}
func (ray VRay) OutboundInput() <-chan []byte {
return ray.Input
}
func (ray VRay) OutboundOutput() chan<- []byte {
return ray.Output
}
func (ray VRay) InboundInput() chan<- []byte {
return ray.Input
}
func (ray VRay) InboundOutput() <-chan []byte {
return ray.Output
}