@Override public synchronized void incomingFrame(Frame frame) { if (frame.getType().isControl() || !frame.isRsv1()) { // Cannot modify incoming control frames or ones with RSV1 set. nextIncomingFrame(frame); return; } ByteBuffer data = frame.getPayload(); method.decompress().input(data); while (!method.decompress().isDone()) { ByteBuffer uncompressed = method.decompress().process(); WebSocketFrame out = new WebSocketFrame(frame).setPayload(uncompressed); if (!method.decompress().isDone()) { out.setFin(false); } out.setRsv1(false); // Unset RSV1 on decompressed frame nextIncomingFrame(out); } // reset on every frame. // method.decompress().end(); }
method.decompress().input(data); while (!method.decompress().isDone()) ByteBuffer uncompressed = method.decompress().process(); if (uncompressed == null) if (!method.decompress().isDone()) method.decompress().end();
@Override public synchronized void incomingFrame(Frame frame) { if (frame.getType().isControl() || !frame.isRsv1()) { // Cannot modify incoming control frames or ones with RSV1 set. nextIncomingFrame(frame); return; } ByteBuffer data = frame.getPayload(); method.decompress().input(data); while (!method.decompress().isDone()) { ByteBuffer uncompressed = method.decompress().process(); WebSocketFrame out = new WebSocketFrame(frame).setPayload(uncompressed); if (!method.decompress().isDone()) { out.setFin(false); } out.setRsv1(false); // Unset RSV1 on decompressed frame nextIncomingFrame(out); } // reset on every frame. // method.decompress().end(); }
method.decompress().input(data); while (!method.decompress().isDone()) ByteBuffer uncompressed = method.decompress().process(); if (uncompressed == null) if (!method.decompress().isDone()) method.decompress().end();