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

Method sendPriority

test/org/apache/coyote/http2/Http2TestBase.java:934–950  ·  view source on GitHub ↗
(int streamId, int streamDependencyId, int weight)

Source from the content-addressed store, hash-verified

932
933
934 void sendPriority(int streamId, int streamDependencyId, int weight) throws IOException {
935 byte[] priorityFrame = new byte[14];
936 // length
937 ByteUtil.setThreeBytes(priorityFrame, 0, 5);
938 // type
939 priorityFrame[3] = FrameType.PRIORITY.getIdByte();
940 // No flags
941 // Stream ID
942 ByteUtil.set31Bits(priorityFrame, 5, streamId);
943
944 // Payload
945 ByteUtil.set31Bits(priorityFrame, 9, streamDependencyId);
946 setOneBytes(priorityFrame, 13, weight);
947
948 os.write(priorityFrame);
949 os.flush();
950 }
951
952
953 void sendPriorityUpdate(int streamId, int urgency, boolean incremental) throws IOException {

Calls 6

setThreeBytesMethod · 0.95
set31BitsMethod · 0.95
setOneBytesMethod · 0.95
getIdByteMethod · 0.80
writeMethod · 0.65
flushMethod · 0.65

Tested by

no test coverage detected