public void CS_CHAT_REQ(CustomPacket packet) { //string text = packet.PopString(); //Console.WriteLine($"Chat : {text}"); PT_CS_CHAT_REQ req = PacketData <PT_CS_CHAT_REQ> .Deserialize(packet.m_buffer); //CustomPacket ack = CustomPacket.Create((short)PT.PT_SC_CHAT_ACK); //ack.Push(text); PT_SC_CHAT_ACK ack = new PT_SC_CHAT_ACK(); ack.chatType = 0; ack.chatStr = req.chatStr; CustomPacket send = CustomPacket.Create((short)PT.PT_SC_CHAT_ACK); send.Push(ack.Serialize()); m_token.SendPacket(send); }
public void OnSend(CustomPacket packet) { m_token.SendPacket(packet); }