mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 02:58:26 +08:00
16 lines
280 B
Go
16 lines
280 B
Go
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
|
|
}
|