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

@ -25,7 +25,7 @@ type AckFrame struct {
}
// Write writes an ACK frame.
func (f *AckFrame) Write(b *bytes.Buffer) error {
func (f *AckFrame) Write(b *bytes.Buffer, packetNumber protocol.PacketNumber, packetNumberLen uint8) error {
typeByte := uint8(0x40 | 0x0C)
if f.HasNACK() {