Package org.eclipse.jetty.spdy.frames

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


    @Override
    public void ping(PingInfo pingInfo, Promise<PingResultInfo> promise)
    {
        int pingId = pingIds.getAndAdd(2);
        PingInfoCallback pingInfoCallback = new PingInfoCallback(pingId, promise);
        PingFrame frame = new PingFrame(version, pingId);
        control(null, frame, pingInfo.getTimeout(), pingInfo.getUnit(), pingInfoCallback);
    }
View Full Code Here


    }

    @Override
    public ByteBuffer generate(ControlFrame frame)
    {
        PingFrame ping = (PingFrame)frame;

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

        buffer.putInt(ping.getPingId());

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

        return false;
    }

    private void onPing()
    {
        PingFrame frame = new PingFrame(controlFrameParser.getVersion(), pingId);
        controlFrameParser.onControlFrame(frame);
        reset();
    }
View Full Code Here

TOP

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

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.