Example #1
0
        protected override void OnMasterServerInfo(ServerIpInfo info){
            if (info.ServerType == (byte) EServerType.DatabaseServer) {
                if (_netClientDS != null) return;
                Debug.Log("OnMasterServerInfo" + info);
                ReqOtherServerInfo(EServerType.DatabaseServer, (status, respond) => {
                    if (status != EResponseStatus.Failed) {
                        InitClientDS(respond.Parse<Msg_RepOtherServerInfo>().ServerInfo);
                    }
                });
            }

            if (info.ServerType == (byte) EServerType.LobbyServer) {
                if (_netClientLI != null) return;
                Debug.Log("OnMasterServerInfo" + info);
                ReqOtherServerInfo(EServerType.LobbyServer, (status, respond) => {
                    if (status != EResponseStatus.Failed) {
                        InitClientLI(respond.Parse<Msg_RepOtherServerInfo>().ServerInfo);
                    }
                });
                ReqOtherServerInfo(EServerType.LobbyServer, (status, respond) => {
                    if (status != EResponseStatus.Failed) {
                        lobbyInfo = respond.Parse<Msg_RepOtherServerInfo>().ServerInfo;
                    }
                }, EServerDetailPortType.TcpPort);
            }
        }
 protected override void OnMasterServerInfo(ServerIpInfo info)
 {
     if (info.serverType == (byte)EServerType.DatabaseServer)
     {
         InitClientDSMaster(info);
     }
 }
Example #3
0
 private void InitClientMS(ServerIpInfo msg)
 {
     InitNetClient(ref _netClientMS, msg.Ip, msg.Port, () => {
         _netClientMS.SendMessage(EMsgMS.S2M_RegisterServer, new Msg_RegisterServer()
         {
             ServerInfo = new ServerIpInfo()
             {
                 ServerType = (byte)serverType
             }
         });
     }
                   );
 }
Example #4
0
 private void InitClientMS(ServerIpInfo msg)
 {
     InitNetClient(ref _netClientMS, msg.ip, msg.port, () => {
         Debug.Log("Connect Master " + serverType);
         _netClientMS.Send(EMsgMS.S2M_RegisterServer, new Msg_RegisterServer()
         {
             serverInfo = new ServerIpInfo()
             {
                 serverType = (byte)serverType
             }
         });
     }
                   );
 }
Example #5
0
        protected override void OnMasterServerInfo(ServerIpInfo info)
        {
            if (info.ServerType == (byte)EServerType.DatabaseServer)
            {
                ReqOtherServerInfo(EServerType.DatabaseServer, (status, respond) => {
                    if (status != EResponseStatus.Failed)
                    {
                        InitClientDS(respond.Parse <Msg_RepOtherServerInfo>().ServerInfo);
                    }
                });
            }

            if (info.ServerType == (byte)EServerType.LobbyServer)
            {
                ReqOtherServerInfo(EServerType.LobbyServer, (status, respond) => {
                    if (status != EResponseStatus.Failed)
                    {
                        InitClientLG(respond.Parse <Msg_RepOtherServerInfo>().ServerInfo);
                    }
                });
            }
        }
Example #6
0
 private void InitClientDS(ServerIpInfo info)
 {
     InitNetClient(ref _netClientDS, info.Ip, info.Port, OnDBConn);
 }
Example #7
0
 private void InitClientLI(ServerIpInfo info)
 {
     InitNetClient(ref _netClientLI, info.Ip, info.Port, OnLobbyConn);
 }
Example #8
0
 protected virtual void OnMasterServerInfo(ServerIpInfo info)
 {
 }
Example #9
0
 private void InitClientLG(ServerIpInfo info)
 {
     lobbyInfo = info;
     InitNetClient(ref _netClientLG, info.Ip, info.Port, OnLobbyConn);
 }
 private void InitClientDSMaster(ServerIpInfo info)
 {
     InitNetClient(ref _netClientOMS, info.ip, info.port, OnDBMasterConn);
 }