Package org.eclipse.jetty.spdy.frames

Examples of org.eclipse.jetty.spdy.frames.WindowUpdateFrame


    }

    @Override
    public ByteBuffer generate(ControlFrame frame)
    {
        WindowUpdateFrame windowUpdate = (WindowUpdateFrame)frame;

        int frameBodyLength = 8;
        int totalLength = ControlFrame.HEADER_LENGTH + frameBodyLength;
        ByteBuffer buffer = getByteBufferPool().acquire(totalLength, Generator.useDirectBuffers);
        BufferUtil.clearToFill(buffer);
        generateControlFrameHeader(windowUpdate, frameBodyLength, buffer);

        buffer.putInt(windowUpdate.getStreamId() & 0x7F_FF_FF_FF);
        buffer.putInt(windowUpdate.getWindowDelta() & 0x7F_FF_FF_FF);

        buffer.flip();
        return buffer;
    }
View Full Code Here


                    allDataFramesReceivedLatch.countDown();
                    return;
                }
                if (flowControl)
                {
                    ByteBuffer writeBuffer = generator.control(new WindowUpdateFrame(version, frame.getStreamId(), frame.getLength()));
                    try
                    {
                        channel.write(writeBuffer);
                    }
                    catch (IOException e)
View Full Code Here

        return false;
    }

    private void onWindowUpdate()
    {
        WindowUpdateFrame frame = new WindowUpdateFrame(controlFrameParser.getVersion(), streamId, windowDelta);
        controlFrameParser.onControlFrame(frame);
        reset();
    }
View Full Code Here

        // should not be too smaller than the window size to avoid frequent window updates.
        // Therefore, a pluggable policy should be able to modify the read buffer capacity.
        int length = dataInfo.length();
        if (dataInfo.consumed() == length && !stream.isClosed() && length > 0)
        {
            WindowUpdateFrame windowUpdateFrame = new WindowUpdateFrame(session.getVersion(), stream.getId(), length);
            session.control(stream, windowUpdateFrame, 0, TimeUnit.MILLISECONDS, Callback.Adapter.INSTANCE);
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.spdy.frames.WindowUpdateFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.