public class HostInfo extends Object
| 构造器和说明 |
|---|
HostInfo() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getLocalIP()
获取本地IP地址
Get local IP address
|
static int |
randomPort()
在10000-20000中随机生成端口号,如果已经被使用则重新生成
Randomly get the port number, range from 10,000 to 20,000
Re-random if the port already exists
|
public static String getLocalIP()
public static int randomPort()
Copyright © 2021. All rights reserved.