mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
25 lines
612 B
Go
25 lines
612 B
Go
package quic
|
|
|
|
import (
|
|
. "github.com/onsi/ginkgo"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("public reset", func() {
|
|
Context("writing", func() {
|
|
It("writes public reset packets", func() {
|
|
Expect(writePublicReset(0xdeadbeef, 0x8badf00d, 0xdecafbad)).To(Equal([]byte{
|
|
0x0a,
|
|
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00,
|
|
'P', 'R', 'S', 'T',
|
|
0x02, 0x00, 0x00, 0x00,
|
|
'R', 'N', 'O', 'N',
|
|
0x08, 0x00, 0x00, 0x00,
|
|
'R', 'S', 'E', 'Q',
|
|
0x10, 0x00, 0x00, 0x00,
|
|
0xad, 0xfb, 0xca, 0xde, 0x0, 0x0, 0x0, 0x0,
|
|
0x0d, 0xf0, 0xad, 0x8b, 0x0, 0x0, 0x0, 0x0,
|
|
}))
|
|
})
|
|
})
|
|
})
|