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

@ -52,7 +52,7 @@ func (f *ConnectionCloseFrame) MaxLength() int {
}
// Write writes an CONNECTION_CLOSE frame.
func (f *ConnectionCloseFrame) Write(b *bytes.Buffer) error {
func (f *ConnectionCloseFrame) Write(b *bytes.Buffer, packetNumber protocol.PacketNumber, packetNumberLen uint8) error {
b.WriteByte(0x02)
utils.WriteUint32(b, uint32(f.ErrorCode))