forked from v2ray/v2ray-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f09d65b
commit 1c618e9
Showing
4 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package core | ||
|
||
type VRay struct { | ||
Input chan []byte | ||
Output chan []byte | ||
} | ||
|
||
func NewVRay() *VRay { | ||
ray := new(VRay) | ||
ray.Input = make(chan []byte, 128) | ||
ray.Output = make(chan []byte, 128) | ||
return ray | ||
} | ||
|
||
type OutboundVRay interface { | ||
OutboundInput() <-chan []byte | ||
OutboundOutput() chan<- []byte | ||
} | ||
|
||
type InboundVRay interface { | ||
InboundInput() chan<- []byte | ||
OutboundOutput() <-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 | ||
} |
This file was deleted.
Oops, something went wrong.