public void WritePacket(PacketBase packet, ushort?sequence = null) { sequence = sequence ?? _sequence++; packet.Sequence = sequence.Value; byte[] data = packet.Serialize(); _stream.Write(data, 0, data.Length); }
public void WritePacket(PacketBase packet, ushort?sequence = null) { sequence = sequence ?? _sequence++; packet.Sequence = sequence.Value; byte[] data = packet.Serialize(); _stream.Write(data, 0, data.Length); }