func (this *SServerUserMgr) run_do_1() (err error) { this.M_SServerUserGateConfig, _ = NewSServerUserGateConfig(this) this.M_SServerUserGateConfig.SetAddr("localhost:" + strconv.Itoa(int(bsn_common.GateConfigPort(1)))) this.M_SServerConfigs = nil for { err = this.M_SServerUserGateConfig.Run() if err == nil { break } GSLog.Errorln(err) time.Sleep(time.Duration(5) * time.Second) } err = this.M_SServerUserGateConfig.send_CmdGate2GateConfig_GetServerConfigReq() if err != nil { return } // wait gate config init for i := 0; i < 10; i++ { time.Sleep(time.Duration(1) * time.Second) if this.M_SServerConfigs != nil { return } } return errors.New("gate config init timeout") }
func (this *SApp) ConfigListenPort() uint16 { return bsn_common.GateConfigPort(this.Id()) }