add version number to Frame.Write

This commit is contained in:
Lucas Clemente 2016-05-09 19:50:15 +02:00
parent a219b72968
commit 14b16a429c
21 changed files with 48 additions and 46 deletions

View file

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