Add Port as a type

This commit is contained in:
V2Ray committed 2015-12-02 12:47:54 +01:00
1 parent e8e6cf1429
commit cee85bdf26
16 files changed
+125 -98

No files matched your search

+3 -2
View File
@@ -2,13 +2,14 @@ package point
import (
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/common/retry"
"github.com/v2ray/v2ray-core/proxy/common/connhandler"
"github.com/v2ray/v2ray-core/shell/point/config"
)
type InboundConnectionHandlerWithPort struct {
port uint16
port v2net.Port
handler connhandler.InboundConnectionHandler
}
@@ -45,7 +46,7 @@ func (this *InboundDetourHandler) Initialize() error {
func (this *InboundDetourHandler) Start() error {
for _, ich := range this.ich {
return retry.Timed(100 /* times */, 100 /* ms */).On(func() error {
err := ich.handler.Listen(ich.port)
err := ich.handler.Listen(ich.port.Value())
if err != nil {
return err
}