pull/55/merge
Darien Raymond 9 years ago
parent 9b830fc432
commit f2c3d41f2d

@ -13,6 +13,7 @@ type InboundConnectionHandlerWithPort struct {
handler connhandler.InboundConnectionHandler handler connhandler.InboundConnectionHandler
} }
// Handler for inbound detour connections.
type InboundDetourHandler struct { type InboundDetourHandler struct {
point *Point point *Point
config config.InboundDetourConfig config config.InboundDetourConfig
@ -43,6 +44,7 @@ func (this *InboundDetourHandler) Initialize() error {
return nil return nil
} }
// Starts the inbound connection handler.
func (this *InboundDetourHandler) Start() error { func (this *InboundDetourHandler) Start() error {
for _, ich := range this.ich { for _, ich := range this.ich {
return retry.Timed(100 /* times */, 100 /* ms */).On(func() error { return retry.Timed(100 /* times */, 100 /* ms */).On(func() error {

@ -129,6 +129,9 @@ func (this *Point) Start() error {
return nil return nil
} }
// Dispatches a Packet to an OutboundConnection.
// The packet will be passed through the router (if configured), and then sent to an outbound
// connection with matching tag.
func (this *Point) DispatchToOutbound(packet v2net.Packet) ray.InboundRay { func (this *Point) DispatchToOutbound(packet v2net.Packet) ray.InboundRay {
direct := ray.NewRay() direct := ray.NewRay()
dest := packet.Destination() dest := packet.Destination()

Loading…
Cancel
Save