pass packet number and packet number length to frames.Write

This commit is contained in:
Marten Seemann 2016-04-25 11:34:18 +07:00
parent 7467e7ebff
commit f2eafb7179
13 changed files with 45 additions and 39 deletions

View file

@ -69,7 +69,7 @@ func ParseStreamFrame(r *bytes.Reader) (*StreamFrame, error) {
}
// WriteStreamFrame writes a stream frame.
func (f *StreamFrame) Write(b *bytes.Buffer) error {
func (f *StreamFrame) Write(b *bytes.Buffer, packetNumber protocol.PacketNumber, packetNumberLen uint8) error {
typeByte := uint8(0x80)
if f.FinBit {
typeByte ^= 0x40