public void Send(PacketBase packet, string protocol) { string data = packet.Encode(); if (protocol == "tcp") { SendTcpData(data); } else { SendUdpData(data); } }
public void Send(PacketBase packet) { Send(packet, packet.GetProtocol()); }