Error code standardization

This commit is contained in:
skiffer-git
2023-02-09 11:30:31 +08:00
parent 90e82ec2ef
commit 15cfe949bc
5 changed files with 104 additions and 90 deletions
+9 -1
View File
@@ -2,7 +2,7 @@ package network
import utils "github.com/OpenIMSDK/open_utils"
func GetRpcIP(configIP string) (string, error) {
func GetRpcRegisterIP(configIP string) (string, error) {
registerIP := configIP
if registerIP == "" {
ip, err := utils.GetLocalIP()
@@ -13,3 +13,11 @@ func GetRpcIP(configIP string) (string, error) {
}
return registerIP, nil
}
func GetListenIP(configIP string) string {
if configIP == "" {
return "0.0.0.0"
} else {
return configIP
}
}