// Update is called once per frame public void Update() { if (!GameSettings.Singleton.m_isSingle) { ShortConnect.Update(this); LongConnect.Update(this); } }
public void SendPacket(Packet p, ENConnectionType type = ENConnectionType.enShortConnect) { if (GameSettings.Singleton.m_isSingle) { VirtualServer.Singleton.ProcessMessage(p); } else { switch (type) { case ENConnectionType.enLongConnect: LongConnect.SendPacket(p); break; case ENConnectionType.enShortConnect: default: ShortConnect.SendPacket(p); break; } Debug.Log("Send Msg ,id = " + p.PacketID + " type:" + type); } }
public void StartLongConnect() { Debug.LogWarning("bsIP:" + LCMsgSender.Singleton.BS_IP + ",bsPort:" + LCMsgSender.Singleton.BS_Port); LongConnect.Connect(LCMsgSender.Singleton.BS_IP, LCMsgSender.Singleton.BS_Port, false); LCMsgSender.Singleton.IsTryingConn = true; }