mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-31 14:35:37 -05:00
interface for inbound connection handler manager
This commit is contained in:
@@ -6,12 +6,11 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/app"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
|
||||
)
|
||||
|
||||
type InboundConnectionHandler struct {
|
||||
Port v2net.Port
|
||||
space app.Space
|
||||
Space app.Space
|
||||
ConnInput io.Reader
|
||||
ConnOutput io.Writer
|
||||
}
|
||||
@@ -22,7 +21,7 @@ func (this *InboundConnectionHandler) Listen(port v2net.Port) error {
|
||||
}
|
||||
|
||||
func (this *InboundConnectionHandler) Communicate(packet v2net.Packet) error {
|
||||
ray := this.space.PacketDispatcher().DispatchToOutbound(packet)
|
||||
ray := this.Space.PacketDispatcher().DispatchToOutbound(packet)
|
||||
|
||||
input := ray.InboundInput()
|
||||
output := ray.InboundOutput()
|
||||
@@ -48,8 +47,3 @@ func (this *InboundConnectionHandler) Communicate(packet v2net.Packet) error {
|
||||
writeFinish.Lock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *InboundConnectionHandler) Create(space app.Space, config interface{}) (connhandler.InboundConnectionHandler, error) {
|
||||
this.space = space
|
||||
return this, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user