public void HandleMsg(System.Object state, TNetMsg msg) { //send the message to the particular message system. // TunerSerializer temp = new TunerSerializer(); // TunerMessage.PBString str; // str = temp.Deserialize(msg.m_DataMsg, null, typeof(TunerMessage.PBString)) as TunerMessage.PBString; // UnityEngine.Debug.Log(msg.m_nMsgID.ToString() +str.str_value); TunerMessage.TMLoginOut temp = TunerMessage.TMLoginOut.Deserialize(msg.m_DataMsg); UnityEngine.Debug.Log(temp.Nickname); }
public void HandleMsg(System.Object state, TNetMsg msg) { TunerMessage.TMLogin temp = TunerMessage.TMLogin.Deserialize(msg.m_DataMsg); System.Console.WriteLine(msg.m_nMsgID.ToString() + "__" + temp.Username + "____" + temp.Password); //send the message to the particular message system. //test send Agent tempClient = Server.Instance.getClient((int)state); TunerMessage.TMLoginOut tempMsg = new TunerMessage.TMLoginOut(); tempMsg.Nickname = "yyss"; MemoryStream mem = new MemoryStream(); TunerMessage.TMLoginOut.Serialize(mem, tempMsg); tempClient.SendMessage(7, mem); }