(ack bool, data [8]byte)
| 927 | } |
| 928 | |
| 929 | func (h2f *Framer) WritePing(ack bool, data [8]byte) error { |
| 930 | var flags Flags |
| 931 | if ack { |
| 932 | flags = FlagPingAck |
| 933 | } |
| 934 | h2f.startWrite(FramePing, flags, 0) |
| 935 | h2f.writeBytes(data[:]) |
| 936 | return h2f.endWrite() |
| 937 | } |
| 938 | |
| 939 | // A GoAwayFrame informs the remote peer to stop creating streams on this connection. |
| 940 | // See https://httpwg.org/specs/rfc7540.html#rfc.section.6.8 |