This commit is contained in:
sirjonasxx 2021-01-04 18:35:51 +01:00
parent 02eff13bf8
commit 698e9591a5
2 changed files with 3 additions and 2 deletions

View File

@ -11,14 +11,12 @@ public abstract class PacketHandler {
protected final ExtensionHandler extensionHandler; protected final ExtensionHandler extensionHandler;
private final Object[] trafficObservables; //get notified on packet send private final Object[] trafficObservables; //get notified on packet send
protected final PayloadBuffer payloadBuffer;
protected volatile int currentIndex = 0; protected volatile int currentIndex = 0;
protected final Object sendLock = new Object(); protected final Object sendLock = new Object();
protected PacketHandler(ExtensionHandler extensionHandler, Object[] trafficObservables) { protected PacketHandler(ExtensionHandler extensionHandler, Object[] trafficObservables) {
this.extensionHandler = extensionHandler; this.extensionHandler = extensionHandler;
this.trafficObservables = trafficObservables; this.trafficObservables = trafficObservables;
this.payloadBuffer = new PayloadBuffer();
} }

View File

@ -32,10 +32,13 @@ public abstract class FlashPacketHandler extends PacketHandler {
private volatile List<Byte> tempEncryptedBuffer = new ArrayList<>(); private volatile List<Byte> tempEncryptedBuffer = new ArrayList<>();
volatile boolean isEncryptedStream = false; volatile boolean isEncryptedStream = false;
private final PayloadBuffer payloadBuffer;
FlashPacketHandler(OutputStream outputStream, Object[] trafficObservables, ExtensionHandler extensionHandler) { FlashPacketHandler(OutputStream outputStream, Object[] trafficObservables, ExtensionHandler extensionHandler) {
super(extensionHandler, trafficObservables); super(extensionHandler, trafficObservables);
out = outputStream; out = outputStream;
this.payloadBuffer = new PayloadBuffer();
} }
public boolean isDataStream() {return isDataStream;} public boolean isDataStream() {return isDataStream;}