public void Send(uint packetId, IDataSerializer packet) { Packet pck = GetPacket(packetId); pck.WritePacket(packet); Send(pck); DataStreamPool.Return(pck.Stream); }
public void ReturnWriter(PacketWriter writer) { DataStreamPool.Return(writer.NetworkStream); DataStreamPool.Return(writer.PacketStream); }