public void SendGameEnd(string teamName, int score) { var packet = new GameEndRequestPacket(teamName, score); var client = ClientList[teamName]; var serializedPacket = JsonConvert.SerializeObject(packet); var buff = Encoding.ASCII.GetBytes(serializedPacket); peer.Send(buff, DeliveryMethod.ReliableUnordered); }
public void SendGameEndPacket(GameEndRequestPacket packet) { var request = packet; PostSendPacket(PACKET_ID.GAME_END_REQ, null); }