You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
280 B
16 lines
280 B
2 years ago
|
package network
|
||
|
|
||
|
import utils "github.com/OpenIMSDK/open_utils"
|
||
|
|
||
|
func GetRpcIP(configIP string) (string, error) {
|
||
|
registerIP := configIP
|
||
|
if registerIP == "" {
|
||
|
ip, err := utils.GetLocalIP()
|
||
|
if err != nil {
|
||
|
return "", err
|
||
|
}
|
||
|
registerIP = ip
|
||
|
}
|
||
|
return registerIP, nil
|
||
|
}
|