make WritePublicHeader set the VersionFlag and the ResetFlag

This commit is contained in:
Marten Seemann 2016-04-14 14:27:22 +07:00
parent 5b78f1613c
commit 703aad12c0
3 changed files with 66 additions and 14 deletions

View file

@ -118,10 +118,12 @@ func main() {
})
fullReply := &bytes.Buffer{}
quic.WritePublicHeader(fullReply, &quic.PublicHeader{
ConnectionID: publicHeader.ConnectionID,
PacketNumber: 1,
})
responsePublicHeader := quic.PublicHeader{ConnectionID: publicHeader.ConnectionID, PacketNumber: 1}
fmt.Println(responsePublicHeader)
err = responsePublicHeader.WritePublicHeader(fullReply)
if err != nil {
panic(err)
}
nullAEAD.Seal(fullReply, fullReply.Bytes(), replyFrame.Bytes())