(int streamId, long errorCode)
| 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 { |
no test coverage detected