Search in sources :

Example 11 with RstStreamFrame

use of com.webpieces.http2.api.dto.lowlevel.RstStreamFrame in project webpieces by deanhiller.

the class TestC5x1StreamStates method sendResetFromServer.

private void sendResetFromServer(MockResponseListener listener1, Http2Request request) {
    RstStreamFrame resp1 = Requests.createReset(request.getStreamId());
    // endOfStream=true
    mockChannel.write(resp1);
    RstStreamFrame response1 = (RstStreamFrame) listener1.getSingleRstStream();
    Assert.assertEquals(resp1, response1);
}
Also used : RstStreamFrame(com.webpieces.http2.api.dto.lowlevel.RstStreamFrame)

Aggregations

RstStreamFrame (com.webpieces.http2.api.dto.lowlevel.RstStreamFrame)11 Test (org.junit.Test)6 Http2Request (com.webpieces.http2.api.dto.highlevel.Http2Request)4 RequestStreamHandle (com.webpieces.http2.api.streaming.RequestStreamHandle)3 StreamRef (com.webpieces.http2.api.streaming.StreamRef)3 StreamWriter (com.webpieces.http2.api.streaming.StreamWriter)3 CancelReason (com.webpieces.http2.api.dto.lowlevel.CancelReason)2 InetSocketAddress (java.net.InetSocketAddress)2 ByteBuffer (java.nio.ByteBuffer)2 DataWrapper (org.webpieces.data.api.DataWrapper)2 MockResponseListener (org.webpieces.httpclient.api.mocks.MockResponseListener)2 ConnectionException (com.webpieces.http2.api.dto.error.ConnectionException)1 Http2Response (com.webpieces.http2.api.dto.highlevel.Http2Response)1 Http2Header (com.webpieces.http2.api.dto.lowlevel.lib.Http2Header)1 Http2Msg (com.webpieces.http2.api.dto.lowlevel.lib.Http2Msg)1 ShutdownStream (com.webpieces.http2engine.api.error.ShutdownStream)1 Stream (com.webpieces.http2engine.impl.shared.data.Stream)1 FrameHeaderData (com.webpieces.http2parser.impl.FrameHeaderData)1 MockResponseListener (org.webpieces.http2client.mock.MockResponseListener)1 MockStreamWriter (org.webpieces.http2client.mock.MockStreamWriter)1