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;
private final Object[] trafficObservables; //get notified on packet send
protected final PayloadBuffer payloadBuffer;
protected volatile int currentIndex = 0;
protected final Object sendLock = new Object();
protected PacketHandler(ExtensionHandler extensionHandler, Object[] trafficObservables) {
this.extensionHandler = extensionHandler;
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<>();
volatile boolean isEncryptedStream = false;
private final PayloadBuffer payloadBuffer;
FlashPacketHandler(OutputStream outputStream, Object[] trafficObservables, ExtensionHandler extensionHandler) {
super(extensionHandler, trafficObservables);
out = outputStream;
this.payloadBuffer = new PayloadBuffer();
}
public boolean isDataStream() {return isDataStream;}