MCPcopy Index your code
hub / github.com/apache/tomcat / sendRst

Method sendRst

test/org/apache/coyote/http2/Http2TestBase.java:835–848  ·  view source on GitHub ↗
(int streamId, long errorCode)

Source from the content-addressed store, hash-verified

833
834
835 void sendRst(int streamId, long errorCode) throws IOException {
836 byte[] rstFrame = new byte[13];
837 // length is always 4
838 rstFrame[2] = 0x04;
839 rstFrame[3] = FrameType.RST.getIdByte();
840 // no flags
841 // Stream ID
842 ByteUtil.set31Bits(rstFrame, 5, streamId);
843 // Payload
844 ByteUtil.setFourBytes(rstFrame, 9, errorCode);
845
846 os.write(rstFrame);
847 os.flush();
848 }
849
850
851 void sendPing() throws IOException {

Callers 5

testErrorMethod · 0.80

Calls 5

set31BitsMethod · 0.95
setFourBytesMethod · 0.95
getIdByteMethod · 0.80
writeMethod · 0.65
flushMethod · 0.65

Tested by

no test coverage detected