mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 12:35:21 -05:00
refactor common/net.Port
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
Port uint16
|
||||
Port v2net.Port
|
||||
MsgProcessor func(msg []byte) []byte
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func (server *Server) Start() (v2net.Address, error) {
|
||||
}
|
||||
go server.acceptConnections(listener)
|
||||
localAddr := listener.Addr().(*net.TCPAddr)
|
||||
return v2net.IPAddress(localAddr.IP, uint16(localAddr.Port)), nil
|
||||
return v2net.IPAddress(localAddr.IP, v2net.Port(localAddr.Port)), nil
|
||||
}
|
||||
|
||||
func (server *Server) acceptConnections(listener *net.TCPListener) {
|
||||
|
||||
Reference in New Issue
Block a user