refactor common/net.Port

This commit is contained in:
Darien Raymond committed 2015-12-02 20:44:01 +00:00
1 parent fa7c1069bc
commit ae056714db
33 files changed
+86 -70

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/v2ray/v2ray-core/app"
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
jsonconfig "github.com/v2ray/v2ray-core/proxy/http/config/json"
)
@@ -22,7 +23,7 @@ func NewHttpProxyServer(dispatcher app.PacketDispatcher, config *jsonconfig.Http
}
}
func (server *HttpProxyServer) Listen(port uint16) error {
func (server *HttpProxyServer) Listen(port v2net.Port) error {
_, err := net.ListenTCP("tcp", &net.TCPAddr{
IP: []byte{0, 0, 0, 0},
Port: int(port),